Skip to content

[AMD] Enable Qwen3 FSDP hybrid-shard CI on ROCm - #2265

Merged
guapisolo merged 1 commit into
radixark:mainfrom
Xinyu-Kang:ci/amd-fsdp-hybrid-shard
Aug 12, 2026
Merged

[AMD] Enable Qwen3 FSDP hybrid-shard CI on ROCm#2265
guapisolo merged 1 commit into
radixark:mainfrom
Xinyu-Kang:ci/amd-fsdp-hybrid-shard

Conversation

@Xinyu-Kang

Copy link
Copy Markdown
Contributor

Summary

Enable the Qwen3 FSDP hybrid-shard CI test on AMD GPUs.

ROCm’s PyTorch version does not provide the private DeviceMesh._unflatten method used to construct the hybrid-shard mesh. This PR adds a capability-based fallback using init_device_mesh.

Newer PyTorch releases continue using the existing _unflatten path, so behavior on NVIDIA and newer environments remains unchanged.

Testing

Validated on 4× AMD MI355 GPUs with PyTorch 2.9.1+ROCm:

  • tests/e2e/fsdp/test_qwen3_4B_fsdp_hybrid_shard_r2s2.py
  • tests/fast-gpu/test_fsdp_hybrid_shard.py
    • r1s4
    • r2s2
    • r4s1

All tests passed.

Reapply the DeviceMesh capability fallback after the FSDP backend moved
out of experimental and dropped context parallelism. Keep the MI300X r2s2
case enabled on the current-main branch.
@guapisolo
guapisolo force-pushed the ci/amd-fsdp-hybrid-shard branch from e8020ed to 5eec662 Compare August 12, 2026 00:56
@guapisolo
guapisolo merged commit 0628624 into radixark:main Aug 12, 2026
14 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants