Repository navigation
[CI Fix][GraphTrainer] Build DeepSeek integration recipes with expert parallelism - #5426
Merged
Merged
Conversation
acisseJZhong
marked this pull request as ready for review
October 15, 2026 19:03
acisseJZhong
requested review from
IvanKobzarev,
SherlockNoMad,
aditvenk,
sanketpurandare and
tianyu-l
as code owners
October 15, 2026 19:03
tianyu-l
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GraphTrainer's DeepSeek integration recipes enable EP after building a model with EP disabled. Routed-expert weights consequently retain the dense placement instead of sharding the expert dimension on the sparse mesh. Pass
expert_parallel_degreeinto the base recipe at construction time; retain the existing runtime mesh degrees and schedules.This fixes the stale sharding configuration behind these five failures in the main H100 job:
aot_fx_trace_deepseek_v3_hsdp_edp_shard_epKeyError: mesh_epaot_fx_trace_deepseek_v3_graph_pp_dual_pipe_v_full_inductorKeyError: mesh_epaot_fx_trace_deepseek_v3_graph_pp_zbv_zero_bubble_full_inductorKeyError: mesh_epaot_fx_trace_deepseek_v3_graph_pp_interleaved_1f1b_full_inductorKeyError: mesh_epaot_fx_trace_deepseek_v3_fused_mla_swiglu_fsdp_tp_epRuntimeError: matrix batch sizes have to matchRoot cause: #5280 (
b81852f007) moved sharding to model-config construction and removed the runtime re-sharding step, but missed these derived integration recipes. Its direct parent's H100 run passed the integration stage; the run at #5280 first failed all five integrations. Both usedtorch==2.16.0.dev20261011+cu132. The fused test initially reported an ambient-mesh error and now reaches the grouped-matmul shape error. The missing EP placement was reproduced with a local CPU configuration check.Pass EP at construction time in all seven affected callers of the default DeepSeek GraphTrainer recipe in
integration_tests.py, covering 15 derived recipes. Existing integration tests exercise the fix. Other recipe families already build with the required EP-enabled layout or only change mesh degrees.Validation:
torch==2.16.0.dev20261015+cpu, with the shared environment's incompatible optional CUDA-onlytorchcommspackage hidden from import. No model/sharding code was mocked.pre-commit run --all-files: all hooks except Pyrefly pass; Pyrefly reports 54 existing dependency/type errors outside this change. Restored unrelated automatic edits. Scoped lint passes with Pyrefly skipped.