-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[MPS] Add support for bf16 autocast #139390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Kulin Seth <kulin_seth@apple.com> Co-authored-by: Siddharth Kotapati <skotapati@apple.com>
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/139390
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ You can merge normally! (1 Unrelated Failure)As of commit e716891 with merge base 3192bde ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com>
|
@malfet is this good to go? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 1 checks: pull / cuda12.1-py3.10-gcc9-sm75 / test (pr_time_benchmarks, 1, 1, linux.g4dn.metal.nvidia.gpu) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
This PR adds support for bf16 autocast. Most of the code and ideas are copied from pytorch#99272. Most of the heavy lifting was done by AI. Fixes pytorch#139386 Pull Request resolved: pytorch#139390 Approved by: https://github.com/malfet Co-authored-by: Kulin Seth <kulin_seth@apple.com> Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com>
|
What happened here? |
|
@hg0428 The PR was merged to For a primer on how to use autocast please see https://pytorch.org/docs/stable/amp.html and https://pytorch.org/docs/stable/notes/amp_examples.html. If it's still not clear, please ask on https://discuss.pytorch.org/. |
This PR adds support for bf16 autocast. Most of the code and ideas are copied from #99272.
Most of the heavy lifting was done by AI.
Fixes #139386
cc @mcarilli @ptrblck @leslie-fang-intel @jgong5