Skip to content

[graph_trainer] Runs 9-10 MinimalAsyncEP perf matrix + EP toggle in benchmark script - #3640

Closed
SherlockNoMad wants to merge 2 commits into
gh/SherlockNoMad/58/basefrom
gh/SherlockNoMad/58/head
Closed

SherlockNoMad wants to merge 2 commits into
gh/SherlockNoMad/58/basefrom
gh/SherlockNoMad/58/head

Conversation

@SherlockNoMad

@SherlockNoMad SherlockNoMad commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Add EP=regular|minimal toggle to run_graph_trainer_dsv3.sh (composes with MODE),
and record the MinimalAsyncEP row of the 2x2 matrix at B=16:
Run 9 graph_trainer + MinimalAsyncEP + forced cudagraph (mfu ~19-21%, peak 57.3 GiB)
Run 10 eager Trainer + MinimalAsyncEP (mfu ~18-23%, peak 65.7 GiB)

MinimalAsyncEP is a real throughput win in both backends (+14% graph / +23% eager
tps vs regular EP). graph_trainer keeps its ~11-16% lower peak memory in both EP
modes. Regular-EP row (Runs 7/8) is bitwise-verified; the MinimalAsyncEP row +
forced cudagraph remains numerics-unverified (next correctness milestone).

[ghstack-poisoned]
[ghstack-poisoned]
IvanKobzarev pushed a commit to IvanKobzarev/torchtitan that referenced this pull request Jun 17, 2026
…cs + toggles

run_graph_trainer_dsv3.sh: add EP=regular|minimal, STEPS (default 20), and
PROFILE (default 1) toggles (PROFILE=0 = lean throughput run: no profiler/
snapshot/tlparse/uploads). run_loss_compare_dsv3.sh: add CONFIG_SUFFIX (variant
on both sides, e.g. _minimal_async_ep) and TEST_CUDAGRAPH toggles.

Record the MinimalAsyncEP row of the 2x2 matrix at B=16 (Runs 9/10), a clean
profiler-off 50-step MFU re-measure (Runs 9'/10'), and the bitwise numerics
verification.

Throughput (clean, profiler-off, B=16, steps 20-50 avg):
  graph 22.54% MFU / 12,310 tps / 57.3 GiB peak
  eager 22.96% MFU / 12,540 tps / 65.7 GiB peak
-> eager ~1.9% faster; graph ~13% less memory. At B=16 both are ~99% GPU-bound,
so cudagraph's host-launch collapse buys memory/CPU headroom, not throughput.
(The step-10 MFU and the profiled trace were both measurement artifacts pulling
opposite ways -- capture-in-the-rolling-average vs profiler-taxes-eager's-launches.)

Numerics: graph_trainer + MinimalAsyncEP is BITWISE-IDENTICAL to eager
(--debug.deterministic --debug.seed=42, 20 steps, dp8/tp1/ep4): loss + grad_norm
0/20, max|diff| 0.000e+00, with cudagraph disabled AND with the forced cudagraph
(312 _grouped_mm nodes captured past the sm_90 gate). This proves MinimalAsyncEP
is deterministic + correct and that the forced-cudagraph hack is numerically safe
on H100 -- resolving the unverified caveats carried since Runs 4-6. Regular-EP row
(Runs 7/8) was already bitwise-verified.

ghstack-source-id: b4adc19
Pull-Request: pytorch#3640
@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

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