Repository navigation
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/186667
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 265ca5a with merge base 1b62beb ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
**Summary: ** Adds 11 single dim strategies, 2 of which were not registered before. **Test Cases** 1. pytest test/distributed/tensor/test_matrix_ops.py 2. pytest test/distributed/tensor/test_op_strategy.py -k test_redistribute_cost_latency 3. pytest test/distributed/tensor/test_op_strategy.py -k test_redistribute_cost_mesh_2d 4. pytest test/distributed/tensor/test_op_strategy.py -k test_bmm_strategies [ghstack-poisoned]
**Summary: ** Adds 11 single dim strategies, 2 of which were not registered before. **Test Cases** 1. pytest test/distributed/tensor/test_matrix_ops.py 2. pytest test/distributed/tensor/test_op_strategy.py -k test_redistribute_cost_latency 3. pytest test/distributed/tensor/test_op_strategy.py -k test_redistribute_cost_mesh_2d 4. pytest test/distributed/tensor/test_op_strategy.py -k test_bmm_strategies [ghstack-poisoned]
**Summary: ** Adds 11 single dim strategies, 2 of which were not registered before. **Test Cases** 1. pytest test/distributed/tensor/test_matrix_ops.py 2. pytest test/distributed/tensor/test_op_strategy.py -k test_redistribute_cost_latency 3. pytest test/distributed/tensor/test_op_strategy.py -k test_redistribute_cost_mesh_2d 4. pytest test/distributed/tensor/test_op_strategy.py -k test_bmm_strategies [ghstack-poisoned]
**Summary: ** Adds 11 single dim strategies, 2 of which were not registered before. **Test Cases** 1. pytest test/distributed/tensor/test_matrix_ops.py 2. pytest test/distributed/tensor/test_op_strategy.py -k test_redistribute_cost_latency 3. pytest test/distributed/tensor/test_op_strategy.py -k test_redistribute_cost_mesh_2d 4. pytest test/distributed/tensor/test_op_strategy.py -k test_bmm_strategies [ghstack-poisoned]
**Summary: ** Adds 11 single dim strategies, 2 of which were not registered before. **Test Cases** 1. pytest test/distributed/tensor/test_matrix_ops.py 2. pytest test/distributed/tensor/test_op_strategy.py -k test_redistribute_cost_latency 3. pytest test/distributed/tensor/test_op_strategy.py -k test_redistribute_cost_mesh_2d 4. pytest test/distributed/tensor/test_op_strategy.py -k test_bmm_strategies [ghstack-poisoned]
|
@pytorchbot merge |
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 |
Merge failedReason: 1 jobs have failed, first few of them are: torchtitan-test / torchtitan-x-pytorch-test / test-osdc (torchtitan_features_integration, 1, 1, mt-l-x86aavx2-189-704-a10g-8) Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge -f "unrelated torchtitan failure" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
The single-dim strategy path inserts an implicit all-Replicate rule. SDPA efficient attention intentionally uses None output specs for philox_seed and philox_offset so those scalar tensor outputs remain local tensors, matching the previous op-strategy behavior. The inserted rule used Replicate for those outputs because meta propagation returns real scalar TensorMeta, so combining it with explicit SDPA rules on a 2D mesh could build a DTensorSpec with placements=(Replicate(), None). This addresses a regression from #186667, which migrated matrix ops to single-dim strategies and introduced the mixed per-mesh-dim behavior for these outputs. Preserve output positions that are None in every explicit single-dim strategy when inserting the implicit replicate rule. Also make full-mesh expansion reject mixed None/Placement entries instead of constructing invalid DTensorSpec objects. Test Plan: Added regression tests for SDPA efficient-attention philox scalar outputs and mixed None/Placement output rejection. Ran the affected tests and lintrunner. Authored with the assistance of an AI coding assistant. Pull Request resolved: #187199 Approved by: https://github.com/pianpwk
**Summary: ** Adds 11 single dim strategies, 2 of which were not registered before. **Test Cases** 1. pytest test/distributed/tensor/test_matrix_ops.py 2. pytest test/distributed/tensor/test_op_strategy.py -k test_redistribute_cost_latency 3. pytest test/distributed/tensor/test_op_strategy.py -k test_redistribute_cost_mesh_2d 4. pytest test/distributed/tensor/test_op_strategy.py -k test_bmm_strategies Pull Request resolved: pytorch#186667 Approved by: https://github.com/pianpwk, https://github.com/weifengpy
PyTorch removed _mm_like_strategy when pytorch/pytorch#186667 migrated mm to single-dim strategy. Register AutoParallel's einsum strategy on the single-dim path and reuse _try_single_dim_strategy for expansion. Pass user kwargs through to DTensor OpSchema so single-dim strategies that depend on keyword-only arguments can compute metadata correctly. Authored with Claude. stack-info: PR: #489, branch: aditvenk/stack/1
ScaledDotProductAttention.forward receives q/k/v in model layout (B, L, H, D), then transposes them to SDPA layout (B, H, L, D). The CP wrapper annotates q/k/v before that transpose, so the shard dimension must be expressed in the model layout. CP splits the sequence axis, which is dim 1 in (B, L, H, D). The old code used Shard(2), annotating the head axis instead. After the transpose, PyTorch saw Shard(1) at the SDPA op, i.e. head sharding in (B, H, L, D), instead of the required Shard(2) sequence sharding. This was latent because PyTorch's old CP SDPA sharding rule appended the CP sequence strategy to the normal SDPA base strategies, so the wrong head-sharded metadata could match a non-CP/base head-sharded strategy and pass propagation. pytorch/pytorch#186667 migrated these rules to single-dim strategies and the CP override now only accepts the CP sequence strategy. That correctly exposes the bad TorchTitan annotation as needs_redistribute=True, which triggers the CP SDPA handler's assertion. Use Shard(1) when wrapping the pre-transpose q/k/v tensors, so the transpose presents Shard(2) at the actual SDPA op. Error seen in Graph Trainer CI test "aot_fx_trace llama3 FSDP+TP+CP" failed in torch/distributed/tensor/experimental/_context_parallel/_attention.py with AssertionError: "inputs need to be redistributed".
**Summary: ** Adds 11 single dim strategies, 2 of which were not registered before. **Test Cases** 1. pytest test/distributed/tensor/test_matrix_ops.py 2. pytest test/distributed/tensor/test_op_strategy.py -k test_redistribute_cost_latency 3. pytest test/distributed/tensor/test_op_strategy.py -k test_redistribute_cost_mesh_2d 4. pytest test/distributed/tensor/test_op_strategy.py -k test_bmm_strategies Pull Request resolved: pytorch#186667 Approved by: https://github.com/pianpwk, https://github.com/weifengpy
The single-dim strategy path inserts an implicit all-Replicate rule. SDPA efficient attention intentionally uses None output specs for philox_seed and philox_offset so those scalar tensor outputs remain local tensors, matching the previous op-strategy behavior. The inserted rule used Replicate for those outputs because meta propagation returns real scalar TensorMeta, so combining it with explicit SDPA rules on a 2D mesh could build a DTensorSpec with placements=(Replicate(), None). This addresses a regression from pytorch#186667, which migrated matrix ops to single-dim strategies and introduced the mixed per-mesh-dim behavior for these outputs. Preserve output positions that are None in every explicit single-dim strategy when inserting the implicit replicate rule. Also make full-mesh expansion reject mixed None/Placement entries instead of constructing invalid DTensorSpec objects. Test Plan: Added regression tests for SDPA efficient-attention philox scalar outputs and mixed None/Placement output rejection. Ran the affected tests and lintrunner. Authored with the assistance of an AI coding assistant. Pull Request resolved: pytorch#187199 Approved by: https://github.com/pianpwk
**Summary: ** Adds 11 single dim strategies, 2 of which were not registered before. **Test Cases** 1. pytest test/distributed/tensor/test_matrix_ops.py 2. pytest test/distributed/tensor/test_op_strategy.py -k test_redistribute_cost_latency 3. pytest test/distributed/tensor/test_op_strategy.py -k test_redistribute_cost_mesh_2d 4. pytest test/distributed/tensor/test_op_strategy.py -k test_bmm_strategies Pull Request resolved: pytorch#186667 Approved by: https://github.com/pianpwk, https://github.com/weifengpy
The single-dim strategy path inserts an implicit all-Replicate rule. SDPA efficient attention intentionally uses None output specs for philox_seed and philox_offset so those scalar tensor outputs remain local tensors, matching the previous op-strategy behavior. The inserted rule used Replicate for those outputs because meta propagation returns real scalar TensorMeta, so combining it with explicit SDPA rules on a 2D mesh could build a DTensorSpec with placements=(Replicate(), None). This addresses a regression from pytorch#186667, which migrated matrix ops to single-dim strategies and introduced the mixed per-mesh-dim behavior for these outputs. Preserve output positions that are None in every explicit single-dim strategy when inserting the implicit replicate rule. Also make full-mesh expansion reject mixed None/Placement entries instead of constructing invalid DTensorSpec objects. Test Plan: Added regression tests for SDPA efficient-attention philox scalar outputs and mixed None/Placement output rejection. Ran the affected tests and lintrunner. Authored with the assistance of an AI coding assistant. Pull Request resolved: pytorch#187199 Approved by: https://github.com/pianpwk
**Summary: ** Adds 11 single dim strategies, 2 of which were not registered before.
Test Cases
Stack from ghstack (oldest at bottom):