Repository navigation
Conversation
test_2d_mlp_with_nd_mesh and test_train_parity_2d_mlp were skipped on MI200 (gfx90a) in pytorch#164390 because they hang. The hang is not in PyTorch: with the ROCm 10.0 user-space stack, RCCL collective kernels issued concurrently on several communicators (FSDP2 on its priority=-1 streams, TP on the current stream) deadlock on the GPU. All GPUs stay 100% busy while the host threads, including RCCL's proxy threads, sit idle. The same stream pattern without RCCL does not hang, and torch 2.15 and 2.16 behave identically on ROCm 10.0. The ROCm 10.1 user-space stack fixes it, and trunk CI already runs ROCm 10.1 (pytorch#196753). The fix holds when 10.0 behavior is restored on 10.1 via DEBUG_HIP_IGNORE_STREAM_PRIORITY=0 (high-priority hardware queues) or DEBUG_CLR_AQL_BARRIER_OPT=0, so neither of those 10.1 defaults is the fix. Swapping in ROCr 10.1 alone does not fix it, which leaves CLR and/or RCCL. This matches ROCm/rccl#2191. The exact ROCm commit was not isolated, because prebuilt HIP and RCCL from different versions cannot be mixed. This change drops the two arch skips and the imports they leave unused. Not taken: forcing normal-priority streams in FSDP2 on ROCm, or setting DEBUG_HIP_IGNORE_STREAM_PRIORITY=1 / GPU_MAX_HW_QUEUES=16. Each of these avoids the trigger on ROCm 10.0 without fixing the underlying bug. Test Plan On 8x MI250X (gfx90a), nothing else running on the node, with the nightly torch 2.16.0.dev20261117+rocm10.1 (test sources at cc63375) and with the skips removed: ``` python -m pytest distributed/_composable/fsdp/test_fully_shard_training.py -q -s --timeout 800 -k "TestFullyShardNDTraining and test_2d_mlp_with_nd_mesh" python -m pytest distributed/_composable/test_composability/test_2d_composability.py -q -s --timeout 800 -k "TestFullyShard2DTraining and test_train_parity_2d_mlp" ``` ROCm 10.1: 7/7 and 3/3 pass. test_2d_mlp_with_nd_mesh also passes 3/3 with DEBUG_HIP_IGNORE_STREAM_PRIORITY=0. ROCm 10.0 (torch 2.15.0.dev20260926): test_2d_mlp_with_nd_mesh fails 5/5 at the 300s timeout. The only FSDP2 changes between cc63375 and this base (pytorch#204750, pytorch#204942) affect size-1 shard meshes, which neither test uses. Lint was not run locally: spin and lintrunner are not available in this environment. This change and description were authored with an AI assistant. Co-authored-by: Cursor <[email protected]>
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/205508
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit dbcde37 with merge base 42d36d3 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
| ) | ||
|
|
||
| @skip_if_lt_x_gpu(4, allow_cpu=True) | ||
| @skip_if_rocm_arch_multiprocess(MI200_ARCH) |
There was a problem hiding this comment.
based on your pr description, it seems we'd want these to convert to skip if rocm <= 10.0
|
My agent came up with this analysis, but I've read and approved it.
|
|
My agent came up with this analysis, but I've read and approved it.
|
…right test_2d_mlp_with_nd_mesh hangs on MI200 with ROCm 10.0 (5/5 per the PR's measurements) and passes with 10.1, so the MI200 arch skip becomes skip_if_rocm_ver_lessthan_multiprocess((10, 1)) on both tests rather than being removed. A version skip stacked on the arch skip would not work, because stacked skips OR together. Test Plan: on 4x gfx90a (fleet mi200), ROCm 10.1.0, torch nightly with these test files: ``` python test/distributed/_composable/fsdp/test_fully_shard_training.py -v -k test_2d_mlp_with_nd_mesh python test/distributed/_composable/test_composability/test_2d_composability.py -v -k test_train_parity_2d_mlp ``` Authored with Claude.
|
|
|
My agent came up with this analysis, but I've read and approved it.
|
The requested ROCm version gate was added in dbcde37: both tests now carry @skip_if_rocm_ver_lessthan_multiprocess((10, 1)).
|
@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: Auto Request Review Details for Dev Infra teamRaised by workflow job |
|
@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 |
Linked issue or supporting maintainer
Fixes #168404
Fixes #168405
Fixes #168406
Fixes #168407
BC-breaking?
No
Summary (human written only)
The MI200 skips on
test_2d_mlp_with_nd_meshandtest_train_parity_2d_mlp(added in #164390)were covering a GPU-side RCCL deadlock in the ROCm 10.0 user-space stack, not a PyTorch bug
(ROCm/rccl#2191). With ROCm 10.1, which trunk CI now uses (#196753), both tests pass on gfx90a,
so this removes the skips.
test_fully_shard_training_overlapis unchanged: its ROCm >= 10.1 skipis still needed because of the reduced hardware-queue count, not because of this hang.
Agent details (if applicable)
cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @jataylo @hongxiayang @naromero77amd @pragupta @jerrymannil @xinyazhang