Skip to content

Conversation

@malfet
Copy link
Contributor

@malfet malfet commented Sep 30, 2024

Stack from ghstack (oldest at bottom):

By even further reducing precisions of imprecise FP16 ops, introducing new BF16_LOW_PRECISION_OPS category and marking BF16 tests as xfail for divfloor_rounding, floor_divide and remainder.
I guess the nature of low-precision results, is that MPSGraph, unlike the rest of the PyTorch does not do accumulation over fp32 for reduction operations

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Sep 30, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/136987

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit d3b8428 with merge base dfe1d45 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added ciflow/mps Run MPS tests (subset of trunk) topic: not user facing topic category labels Sep 30, 2024
malfet added a commit that referenced this pull request Sep 30, 2024
ghstack-source-id: 0f3ddef
Pull Request resolved: #136987
@malfet malfet requested a review from Skylion007 September 30, 2024 05:30
@malfet malfet added topic: improvements topic category release notes: mps Release notes category topic: not user facing topic category and removed topic: not user facing topic category topic: improvements topic category release notes: mps Release notes category labels Sep 30, 2024
malfet added a commit that referenced this pull request Sep 30, 2024
ghstack-source-id: cb63055
Pull Request resolved: #136987
pytorchmergebot pushed a commit that referenced this pull request Sep 30, 2024
Before this change, test failed with unable to compile errors, as `bfloat16` requires explicit cast.
Tested in #136987
Pull Request resolved: #136981
Approved by: https://github.com/Skylion007
pytorchmergebot pushed a commit that referenced this pull request Sep 30, 2024
)

Just adds instantiation of the kernels and sometimes explicit cast.
Tested in #136987
Pull Request resolved: #136982
Approved by: https://github.com/Skylion007
ghstack dependencies: #136981
pytorchmergebot pushed a commit that referenced this pull request Sep 30, 2024
pytorchmergebot pushed a commit that referenced this pull request Sep 30, 2024
malfet added a commit that referenced this pull request Sep 30, 2024
ghstack-source-id: 94bb429
Pull Request resolved: #136987
malfet added a commit that referenced this pull request Oct 1, 2024
ghstack-source-id: abf4979
Pull Request resolved: #136987
@malfet malfet requested a review from albanD October 1, 2024 01:55
By even further reducing precisions of imprecise FP16 ops, introducing new BF16_LOW_PRECISION_OPS category and marking BF16 tests as xfail for `divfloor_rounding`, `floor_divide` and `remainder`


[ghstack-poisoned]
malfet added a commit that referenced this pull request Oct 1, 2024

For Metal cast ops to comple, one need to explicitly cast to/from `bfloat` unlike for other dtypes

Tested in #136987

[ghstack-poisoned]
malfet added a commit that referenced this pull request Oct 1, 2024
ghstack-source-id: a8f92da
Pull Request resolved: #136987
Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance we can fix that behavior? This will most likely change the numerics for end users significantly.
@kulinseth ?

pytorchmergebot pushed a commit that referenced this pull request Oct 1, 2024
For Metal cast ops to comple, one need to explicitly cast to/from `bfloat` unlike for other dtypes

Tested in #136987
Pull Request resolved: #137070
Approved by: https://github.com/Skylion007
By even further reducing precisions of imprecise FP16 ops, introducing new BF16_LOW_PRECISION_OPS category and marking BF16 tests as xfail for `divfloor_rounding`, `floor_divide` and `remainder`. 
I guess the nature of low-precision results, is that MPSGraph, unlike the rest of the PyTorch does not do accumulation over fp32 for reduction operations


[ghstack-poisoned]
malfet added a commit that referenced this pull request Oct 1, 2024
ghstack-source-id: b999969
Pull Request resolved: #136987
@malfet
Copy link
Contributor Author

malfet commented Oct 1, 2024

@pytorchbot merge -f "MPS + Lint are green"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

AnantGulati pushed a commit to AnantGulati/pytorch that referenced this pull request Oct 2, 2024
Before this change, test failed with unable to compile errors, as `bfloat16` requires explicit cast.
Tested in pytorch#136987
Pull Request resolved: pytorch#136981
Approved by: https://github.com/Skylion007
AnantGulati pushed a commit to AnantGulati/pytorch that referenced this pull request Oct 2, 2024
…rch#136982)

Just adds instantiation of the kernels and sometimes explicit cast.
Tested in pytorch#136987
Pull Request resolved: pytorch#136982
Approved by: https://github.com/Skylion007
ghstack dependencies: pytorch#136981
AnantGulati pushed a commit to AnantGulati/pytorch that referenced this pull request Oct 2, 2024
AnantGulati pushed a commit to AnantGulati/pytorch that referenced this pull request Oct 2, 2024
AnantGulati pushed a commit to AnantGulati/pytorch that referenced this pull request Oct 2, 2024
For Metal cast ops to comple, one need to explicitly cast to/from `bfloat` unlike for other dtypes

Tested in pytorch#136987
Pull Request resolved: pytorch#137070
Approved by: https://github.com/Skylion007
AnantGulati pushed a commit to AnantGulati/pytorch that referenced this pull request Oct 2, 2024
By even further reducing precisions of imprecise FP16 ops, introducing new BF16_LOW_PRECISION_OPS category and marking BF16 tests as xfail for `divfloor_rounding`, `floor_divide` and `remainder`.
I guess the nature of low-precision results, is that MPSGraph, unlike the rest of the PyTorch does not do accumulation over fp32 for reduction operations

Pull Request resolved: pytorch#136987
Approved by: https://github.com/albanD
ghstack dependencies: pytorch#137070
@github-actions github-actions bot deleted the gh/malfet/26/head branch November 6, 2024 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/mps Run MPS tests (subset of trunk) Merged topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants