Skip to content

feat(bucketing_and_reordering): support bucketing and reordering for FSDP training - #495

Closed
lipengfei1409 wants to merge 29 commits into
chenyifan/joint_passesfrom
lipengfei/feat/bucheting_and_reordering
Closed

feat(bucketing_and_reordering): support bucketing and reordering for FSDP training#495
lipengfei1409 wants to merge 29 commits into
chenyifan/joint_passesfrom
lipengfei/feat/bucheting_and_reordering

Conversation

@lipengfei1409

Copy link
Copy Markdown
Collaborator

summary

  • we support bucketing and reordering for fsdp training like SimpleFSDP
    • bucketing all-gather in forward and all-gather, reduce-scatter in backward according to module_bucket_plans, like layers.0,layers.1..., see tests/npu/test_trainer/train.py:get_transformer_block_buckets for details.
    • then we will reordering the ops to support communication-computation overlap between mudules in module_bucket_plans

test

  • we provide no-fsdp and fsdp training scipt in tests, and compare the weights to varify the correctness, test only in npu
    python tests/npu/test_trainer/main.py

referece

yfchen-byted and others added 22 commits December 21, 2025 19:35
…oint stage

* use aot_autograd as the dispatcher
* add joint_stage to modify aot_joint_graph
* implement new freezing_compiler for inference
* pregrad passes should be re-implemeneted with joint passes, not implemented yet
* cache is not supporte for joint stage yet, skip for now
* some npu cache test requires fresh artifact, skip them if new dispatcher
@codecov

codecov Bot commented Feb 9, 2026

Copy link
Copy Markdown

@lipengfei1409
lipengfei1409 force-pushed the lipengfei/feat/bucheting_and_reordering branch from 29c15e7 to 2b59e16 Compare February 25, 2026 07:45
@lipengfei1409
lipengfei1409 changed the base branch from chenyifan/joint_passes to master February 25, 2026 07:48
@lipengfei1409
lipengfei1409 changed the base branch from master to chenyifan/joint_passes February 27, 2026 07:24
@lipengfei1409
lipengfei1409 deleted the lipengfei/feat/bucheting_and_reordering branch March 2, 2026 04:28
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