[MPS] Speedup torch.full for 1-byte types#158874
Closed
malfet wants to merge 5 commits intogh/malfet/445/basefrom
Closed
[MPS] Speedup torch.full for 1-byte types#158874malfet wants to merge 5 commits intogh/malfet/445/basefrom
malfet wants to merge 5 commits intogh/malfet/445/basefrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/158874
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit ce64e3f with merge base ddd74d1 ( UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
malfet
added a commit
that referenced
this pull request
Jul 22, 2025
By using [`fillBuffer:range:value:`](https://developer.apple.com/documentation/metal/mtlblitcommandencoder/fillbuffer:range:value:?language=objc) rather than MPSGraph op, which should be faster and also does not have INT_MAX limit ghstack-source-id: dd69275 Pull Request resolved: #158874
malfet
added a commit
that referenced
this pull request
Jul 22, 2025
By using [`fillBuffer:range:value:`](https://developer.apple.com/documentation/metal/mtlblitcommandencoder/fillbuffer:range:value:?language=objc) rather than MPSGraph op, which should be faster and also does not have INT_MAX limit ghstack-source-id: 5332cf5 Pull Request resolved: #158874
dcci
approved these changes
Jul 23, 2025
dcci
approved these changes
Jul 23, 2025
test/test_indexing.py
Outdated
| def test_index_put_accumulate_large_tensor(self, device): | ||
| if device.startswith("mps"): | ||
| raise unittest.SkipTest("Crash with max number of dimentions") | ||
| # if device.startswith("mps"): |
Member
There was a problem hiding this comment.
can we just remove it instead of commenting?
Contributor
Author
There was a problem hiding this comment.
That's the plan, but I hugely suspect I'll have to leave the skip for MacOS-13, where 4GB tensors are big taboo
malfet
added a commit
that referenced
this pull request
Jul 23, 2025
By using [`fillBuffer:range:value:`](https://developer.apple.com/documentation/metal/mtlblitcommandencoder/fillbuffer:range:value:?language=objc) rather than MPSGraph op, which should be faster and also does not have INT_MAX limit ghstack-source-id: 98be968 Pull Request resolved: #158874
malfet
added a commit
that referenced
this pull request
Jul 23, 2025
By using [`fillBuffer:range:value:`](https://developer.apple.com/documentation/metal/mtlblitcommandencoder/fillbuffer:range:value:?language=objc) rather than MPSGraph op, which should be faster and also does not have INT_MAX limit ghstack-source-id: 98be968 Pull Request resolved: #158874
Contributor
Author
|
@pytorchbot merge |
Collaborator
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
pytorchmergebot
pushed a commit
that referenced
this pull request
Jul 24, 2025
Though testing is a lie and dependent on #153835 Fixes #153789 Pull Request resolved: #158888 Approved by: https://github.com/albanD ghstack dependencies: #158874
yangw-dev
pushed a commit
that referenced
this pull request
Aug 1, 2025
Though testing is a lie and dependent on #153835 Fixes #153789 Pull Request resolved: #158888 Approved by: https://github.com/albanD ghstack dependencies: #158874
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
By using
fillBuffer:range:value:rather than MPSGraph op, which should be faster and also does not have INT_MAX limitWhich in turn fixes
test_index_put_accumulate_large_tensor_mpstest