Repository navigation
Add FSDP symmetric memory configuration and related tests - #3105
Conversation
|
|
fegin
left a comment
There was a problem hiding this comment.
@weifengpy can you review?
1fdb867 to
a1ba699
Compare
a1ba699 to
7ad9e1f
Compare
weifengpy
left a comment
There was a problem hiding this comment.
looks good on fsdp changes
some nits before landing:
- maybe avoid un-related linter change to make the PR focused?
- I dont see force sum yet. titan use fp32 reduce dtype by default. but would be good to have force sum in case people override default to use bf16/fp16 reduce
1ef927c to
0377c49
Compare
Signed-off-by: Masaki Kozuki <[email protected]>
Signed-off-by: Masaki Kozuki <[email protected]>
Signed-off-by: Masaki Kozuki <[email protected]>
Signed-off-by: Masaki Kozuki <[email protected]>
Signed-off-by: Masaki Kozuki <[email protected]>
Signed-off-by: Masaki Kozuki <[email protected]>
Signed-off-by: Masaki Kozuki <[email protected]>
Signed-off-by: Masaki Kozuki <[email protected]>
Signed-off-by: Masaki Kozuki <[email protected]>
Signed-off-by: Masaki Kozuki <[email protected]>
Signed-off-by: Masaki Kozuki <[email protected]>
Signed-off-by: Masaki Kozuki <[email protected]>
Signed-off-by: Masaki Kozuki <[email protected]>
0377c49 to
18be5aa
Compare
|
As I can't merge this myself, could any of you land this? maybe @weifengpy? |
Signed-off-by: Masaki Kozuki <[email protected]>
| # Potential hiccup: TorchTitan also supports float8 FSDP all-gather | ||
| # via torchao. That path customizes FSDP communication behavior, so | ||
| # this combination may need extra validation when both are enabled. |
There was a problem hiding this comment.
float8 FSDP all-gather has been deprecated in torchtitan. Please remove this comment.
| """ | ||
| Whether to enable FSDP2 symmetric-memory communication optimizations for | ||
| all FSDP modules after `fully_shard` has been applied. | ||
| """ |
There was a problem hiding this comment.
Does it only work on NVIDIA GPUs? We probably should error out in ParallelismConfig'spost_init
There was a problem hiding this comment.
CI burden is heavy. Maybe just add one more test, or piggyback on an existing test that also skip_rocm, e.g. https://github.com/pytorch/torchtitan/blob/main/tests/integration_tests/features.py#L607
Signed-off-by: Masaki Kozuki <[email protected]>
Signed-off-by: Masaki Kozuki <[email protected]>
|
moved the test case to the h100 chunk |
… routing Merged 7 upstream commits (19c567f..af33f76). Documents which ones needed ezpz replays: - PR pytorch#3398 (Module subclass refactor): 3 import paths replayed in b052f29 — pure import-path swap, class API unchanged. - PR pytorch#3146 (deterministic MoE routing): inherits transitively; this is the upstream fix for the _histc_xpu non-determinism blocker we hit on 2026-05-21. --debug.deterministic on MoE+XPU should now work. - PR pytorch#3423 (MoE [7/n] 3D tensors): inherits transitively; doesn't touch deepseek_v3 callsites. - PR pytorch#3105 (FSDP symm_mem): skipped — ezpz has its own apply_fsdp and symm_mem is an optional optimization XPU CCL likely doesn't support. - PRs pytorch#3331/pytorch#3369/pytorch#3361: graph_trainer-only no-ops. Captures two action items: smoke-test before next production push, and re-try --debug.deterministic on MoE+XPU.
Enable FSDP symmetric-memory communication in TorchTitan’s default trainer path.
This PR wires
parallelism.enable_fsdp_symm_memthrough the regular FSDP2 parallelization paths and callsFSDPModule.set_symm_mem_for_comm()on FSDP modules. This covers the default trainer path, not graph trainer or Inductor compiled async-TP symmetric-memory kernels.Benchmarks
100-step runs on 4x GB200, default trainer path. Throughput excludes the first 20 warmup steps.
torch.compileUsed GPT-5.5