[DTensor] Add sharding prop for masked_fill_.Scalar#169668
Closed
wconstab wants to merge 2 commits intogh/wconstab/470/basefrom
Closed
[DTensor] Add sharding prop for masked_fill_.Scalar#169668wconstab wants to merge 2 commits intogh/wconstab/470/basefrom
wconstab wants to merge 2 commits intogh/wconstab/470/basefrom
Conversation
Fixes #152249 [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/169668
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 910ea58 with merge base 716edc3 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Fixes #152249 [ghstack-poisoned]
zpcore
approved these changes
Dec 5, 2025
Comment on lines
+394
to
+408
| # Test with Replicate placement | ||
| input_tensor2 = ( | ||
| torch.arange(40, dtype=torch.float32, device=self.device_type).reshape(8, 5) | ||
| - 20 | ||
| ) | ||
| mask2 = input_tensor2 < 0 | ||
| fill_value2 = 42.0 | ||
|
|
||
| dt_input2 = distribute_tensor(input_tensor2.clone(), device_mesh, [Replicate()]) | ||
| dt_mask2 = distribute_tensor(mask2, device_mesh, [Replicate()]) | ||
|
|
||
| input_tensor2.masked_fill_(mask2, fill_value2) | ||
| dt_input2.masked_fill_(dt_mask2, fill_value2) | ||
|
|
||
| self.assertEqual(input_tensor2, dt_input2.full_tensor()) |
Member
There was a problem hiding this comment.
I feel test with Partial is more meaningful. We can distribute_tensor directly to Partial now.
Collaborator
|
Starting merge as part of PR stack under #169667 |
pytorchmergebot
pushed a commit
that referenced
this pull request
Dec 6, 2025
Addresses an issue reported where foreach_max and foreach_abs do not compose, which claimed foreach_max and foreach_abs work fine individually. Actually, just adds support for foreach_max, which appears to have been missing all along Pull Request resolved: #169667 Approved by: https://github.com/zpcore ghstack dependencies: #169668
umechand-amd
pushed a commit
to ROCm/pytorch
that referenced
this pull request
Dec 8, 2025
Fixes pytorch#152249 Pull Request resolved: pytorch#169668 Approved by: https://github.com/zpcore
umechand-amd
pushed a commit
to ROCm/pytorch
that referenced
this pull request
Dec 8, 2025
Addresses an issue reported where foreach_max and foreach_abs do not compose, which claimed foreach_max and foreach_abs work fine individually. Actually, just adds support for foreach_max, which appears to have been missing all along Pull Request resolved: pytorch#169667 Approved by: https://github.com/zpcore ghstack dependencies: pytorch#169668
JacobSzwejbka
pushed a commit
that referenced
this pull request
Dec 8, 2025
Fixes #152249 Pull Request resolved: #169668 Approved by: https://github.com/zpcore
JacobSzwejbka
pushed a commit
that referenced
this pull request
Dec 8, 2025
Addresses an issue reported where foreach_max and foreach_abs do not compose, which claimed foreach_max and foreach_abs work fine individually. Actually, just adds support for foreach_max, which appears to have been missing all along Pull Request resolved: #169667 Approved by: https://github.com/zpcore ghstack dependencies: #169668
tiendatngcs
pushed a commit
to tiendatngcs/pytorch-Dec25
that referenced
this pull request
Dec 10, 2025
Fixes #152249 ghstack-source-id: 2adb0a5 Pull Request resolved: pytorch/pytorch#169668
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):
Fixes #152249