Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/199733
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit db63d62 with merge base b8ef869 ( 🟢 GREEN LIGHT - PR approved to be merged without human review:
reason: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
weifengpy
marked this pull request as ready for review
October 5, 2026 06:11
Contributor
Author
|
@pytorchmergebot 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 |
cyyever
pushed a commit
to BakeLab/pytorch
that referenced
this pull request
Oct 11, 2026
pytorch#199733) > AI-assisted change prepared with Claude Code. It was split out of pytorch#199430 and rewritten for main so it can land independently. > > With a size-1 shard mesh, FSDP skips the all-gather and copies the all-gather input directly into the cached all-gather output (since pytorch#160135). When an extension's `fsdp_pre_all_gather` returns a byte view (`uint8`) of its payload while the cached output keeps the payload's original dtype, `copy_` converts values instead of copying bytes. For wider dtypes that fails on the size mismatch (`The size of tensor a (128) must match the size of tensor b (512)` in the new test), and for one-byte dtypes such as float8 it converts the byte values silently. The world size > 1 path already views the outputs as bytes when the buffer is bytes, and the direct copy now views the cached output as bytes for byte payloads too. Main's single-rank path copies only the first payload; copying every payload is part of pytorch#197204. > > Test Plan: `test_all_gather_extension_single_rank_byte_payload` gathers a typed payload and then a byte view of it over a size-1 shard mesh; it fails without the fix with the size mismatch above and passes with it. The local build predates main, so the test ran on an older main (ff18741) whose single-rank path and test file match main's. > ```bash > python test/distributed/_composable/fsdp/test_fully_shard_extensions.py -k test_all_gather_extension_single_rank_byte_payload > ``` Pull Request resolved: pytorch#199733 Approved by: https://github.com/pytorchgreenlight
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):