Skip to content

Add graph PP integration tests for both frontends - #3091

Closed
sanketpurandare wants to merge 9 commits into
sanketpurandare/stack/9from
sanketpurandare/stack/10
Closed

sanketpurandare wants to merge 9 commits into
sanketpurandare/stack/9from
sanketpurandare/stack/10

Conversation

@sanketpurandare

@sanketpurandare sanketpurandare commented Apr 24, 2026 •

Copy link
Copy Markdown
Contributor

sanketpurandare added a commit that referenced this pull request Apr 24, 2026
Add 8-GPU integration test entries (2PP x 2DP x 2EP, DSv3 debugmodel)
for both manual SPMD and autoparallel paths, all under graph_trainer.
Add test_utils.py with run_graph_pp_numerical_parity_test for comparing
graph PP vs regular PP numerics across schedules via loss_compare.py.

stack-info: PR: #3091, branch: sanketpurandare/stack/10
@sanketpurandare
sanketpurandare force-pushed the sanketpurandare/stack/10 branch from 777fefa to 15ecad5 Compare April 24, 2026 19:53
@sanketpurandare
sanketpurandare force-pushed the sanketpurandare/stack/9 branch from 81e2296 to 26db50e Compare April 24, 2026 19:53
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 24, 2026
@sanketpurandare
sanketpurandare changed the base branch from sanketpurandare/stack/9 to main April 30, 2026 18:15
sanketpurandare added a commit that referenced this pull request Apr 30, 2026
Add 8-GPU integration test entries (2PP x 2DP x 2EP, DSv3 debugmodel)
for both manual SPMD and autoparallel paths, all under graph_trainer.
Add test_utils.py with run_graph_pp_numerical_parity_test for comparing
graph PP vs regular PP numerics across schedules via loss_compare.py.

stack-info: PR: #3091, branch: sanketpurandare/stack/10
@sanketpurandare
sanketpurandare force-pushed the sanketpurandare/stack/10 branch from 15ecad5 to d415bbb Compare April 30, 2026 18:15
@sanketpurandare
sanketpurandare changed the base branch from main to sanketpurandare/stack/9 April 30, 2026 18:16
Superseded by autoparallel/local_map_deepseek_v3. Clean up references
in the supported experiments list and README.

stack-info: PR: #2271, branch: sanketpurandare/stack/2
Extract get_pipeline_metadata, split_module, and
get_pp_rank_to_stage_indices_mapping as standalone functions from the
monolithic pipeline_llm. Add backward_requires_autograd and scale_grads
params to build_pipeline_schedule. No behavior change for existing PP.

stack-info: PR: #2724, branch: sanketpurandare/stack/3
SDPA attention variants for Inductor-compatible graph PP. Add
debugmodel_sdpa and 16B_sdpa to deepseekv3_configs, with corresponding
config entries for base model and graph_trainer experiment.

stack-info: PR: #2725, branch: sanketpurandare/stack/4
Add AutoParallelGraph (in autoparallel_api.py): a vendored variant of
AutoParallelPP that overrides apply_placement() to return the
parallelized JointWithDescriptors instead of compiling. This feeds into
graph_trainer's joint_graph_builder for compilation.

Move autoparallel model registrations into graph_trainer:
- autoparallel_deepseek_v3/ (local_map DSv3 with AutoParallelGraph)
- autoparallel_llama3/ (llama3 with AutoParallelGraph)
Both use GraphTrainer.Config and GraphTrainerCompileConfig.

Modify joint_graph_builder to accept pre_built_jwd parameter. When
AutoParallelGraph attaches _joint_with_descriptors to the model,
CompiledModule passes it through to skip export_joint and use the
pre-built parallelized joint graph directly.

Add comms_bucket_reorder_strategy field to GraphTrainerCompileConfig.

stack-info: PR: #2726, branch: sanketpurandare/stack/5
Copy GraphPipelineStage, GraphPPRunner, and graph pass modules
(partition, split_fsdp, split_dI_dW, multiplex) from the external
autoparallel repo. Refactor to remove inductor runtime flag,
NumericsLogger, and DebugInterpreter — graphs are precompiled before
reaching the runner. Extract shared FX utilities into graph_pp_utils.py.

stack-info: PR: #2727, branch: sanketpurandare/stack/6
ModelWithLoss wraps the last pipeline stage with loss computation so it
is included in the compiled graph. get_input_generating_fns and
get_shape_inference_fns create tracing inputs and inter-stage P2P buffer
shapes. Used by both manual SPMD and autoparallel frontends.

stack-info: PR: #3088, branch: sanketpurandare/stack/7
Add graph_pp_pipeline_llm: splits model into stages, applies
parallelisms via parallelize_fn (manual SPMD or autoparallel), and
for each stage either uses the pre-built _joint_with_descriptors
(autoparallel path) or calls export_joint_for_pp (manual SPMD path).
Creates GraphPipelineStage + GraphPPRunner for execution.

Add export_joint_for_pp: thin wrapper around export_joint that applies
joint custom passes before returning JointWithDescriptors.

Wire _pipelining_fn dispatch in both deepseek_v3 and
autoparallel_deepseek_v3 model registries. Remove aot_fx_trace PP
restriction in trainer and add SymFloat grad_norm handling.

stack-info: PR: #3089, branch: sanketpurandare/stack/8
Wire DeepSeekV3ModelArgs._owner so config.build() constructs the correct
class. Add verify_module_protocol override to skip the check since
autoparallel submodules are standard nn.Modules.

stack-info: PR: #3090, branch: sanketpurandare/stack/9
Add 8-GPU integration test entries (2PP x 2DP x 2EP, DSv3 debugmodel)
for both manual SPMD and autoparallel paths, all under graph_trainer.
Add test_utils.py with run_graph_pp_numerical_parity_test for comparing
graph PP vs regular PP numerics across schedules via loss_compare.py.

stack-info: PR: #3091, branch: sanketpurandare/stack/10
@sanketpurandare
sanketpurandare changed the base branch from sanketpurandare/stack/9 to main April 30, 2026 18:41
@sanketpurandare
sanketpurandare force-pushed the sanketpurandare/stack/10 branch from d415bbb to 648d2e7 Compare April 30, 2026 18:41
@sanketpurandare
sanketpurandare changed the base branch from main to sanketpurandare/stack/9 April 30, 2026 18:41
@sanketpurandare
sanketpurandare force-pushed the sanketpurandare/stack/9 branch 9 times, most recently from bfc34fb to a6abff2 Compare May 8, 2026 16:57
@sanketpurandare
sanketpurandare force-pushed the sanketpurandare/stack/9 branch from a6abff2 to 864caa7 Compare June 9, 2026 03:59
@sanketpurandare
sanketpurandare force-pushed the sanketpurandare/stack/9 branch 15 times, most recently from ac23e1f to f6014fe Compare July 2, 2026 08:14
@tianyu-l tianyu-l closed this Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/8gpu CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants