Skip to content

Align per-rank fused FSDP collective payloads to 512 bytes - #369

Closed
zhangming700 wants to merge 2 commits into
hf1s:JT_devfrom
zhangming700:fsdp-fused-512b-rank-alignment
Closed

zhangming700 wants to merge 2 commits into
hf1s:JT_devfrom
zhangming700:fsdp-fused-512b-rank-alignment

Conversation

@zhangming700

@zhangming700 zhangming700 commented Nov 25, 2026 •

Copy link
Copy Markdown

Round each rank's fused AllGather and ReduceScatter payload up to 512 bytes in the collective dtype. Keep parameter offsets intact and consume the AllGather tail with an additional split output on the dim-0 fast path.

Validation

All 26 tests in tests/ut/core/fully_shard/test_param_group.py passed with CPU tensors and mocked collectives in the training image.

Earlier eight-NPU Qwen3-30B-A3B training measurements (five runs per variant) used the implementation on Hyper-Parallel base 5b50a340. The original fusion baseline was collected separately.

Communication mode Mean step (ms) Tokens/s
Per parameter 1135.34 692.89
Original fusion 1217.44 646.17
Fusion with 512-byte alignment and direct split 1179.96 666.69

The aligned implementation reduced mean step time by 3.08% relative to original fusion. Its mean step time remained 3.93% higher than per-parameter communication. These measurements cover the combined alignment and copy-out change.

Training image packages included PyTorch 2.14.0+cpu, torch_npu 2.14.0, CANN 9.2.0, Python 3.12.15 and Hyper-Parallel 1.2.0.dev0.

Superseded by #371 targeting master.

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.

1 participant