Repository navigation
[graph_trainer] Re-enable DSv3 eager bitwise deterministic tests - #3482
Merged
Merged
Conversation
The two DSv3 test_eager_self_deterministic tests (sdpa + FlexAttn) were @unittest.skip-ped in #3432 because their hardcoded model/grad hashes went stale after upstream PyTorch nightly changes (notably the MoE expert-counting switch from histc to routing map in #3450). Re-baseline the inline hashes on H100 via EXPECTTEST_ACCEPT=1 and replace the unconditional @unittest.skip with the @unittest.skipUnless(has_cuda_capability( 9, 0)) gate the Llama3/Qwen3 siblings already use, since these numerics only match on sm_90+. The loss is unchanged (7.4749956130981445 for both); only the full-precision model_hash and grad_hash moved. Verified the eager run is self-deterministic: both tests pass reproducibly against the new baselines without EXPECTTEST_ACCEPT.
SherlockNoMad
requested review from
aditvenk,
sanketpurandare,
tianyu-l,
xmfan and
yiming0416
as code owners
June 2, 2026 06:11
aditvenk
approved these changes
Jun 2, 2026
saforem2
added a commit
to saforem2/torchtitan
that referenced
this pull request
Jun 2, 2026
…no ezpz replay Pulled 2 commits from upstream/main (04a3098..27aa490, merge commit 45a2b25): - 27aa490 [graph_trainer] Add full recompute memory policy (pytorch#3429) - 051562e [graph_trainer] Re-enable DSv3 eager bitwise deterministic tests (pytorch#3482) Both entirely inside torchtitan/experiments/graph_trainer/. Zero ezpz code or doc changes triggered. No conflicts. Tree clean. Documents both commits in upstream-sync.md and adds a one-paragraph journal note pointing at the sync entry.
SherlockNoMad
added a commit
that referenced
this pull request
Jun 2, 2026
The test_eager_self_deterministic baselines for Llama3 FlexAttention, Qwen3 MoE, and Qwen3 MoE FlexAttention drifted after upstream PyTorch nightly numerics changes -- the same class of drift #3432/#3482 handled for DSv3. This is the pure-eager path (base Trainer, no compile): the loss strings are unchanged; only model_hash/grad_hash moved in low-order bits. test_aot_fx_trace_vs_eager still passes, so the trace path stays bitwise-identical to eager; only the absolute baselines were stale. All six hashes (three classes) regenerated on H100 against the CI nightly (cu130).
SherlockNoMad
added a commit
that referenced
this pull request
Jun 2, 2026
…oE) (#3484) ## Summary `test_eager_self_deterministic` baselines for **Llama3 FlexAttention**, **Qwen3 MoE**, and **Qwen3 MoE FlexAttention** drifted after upstream PyTorch nightly numerics changes — the same class of drift #3432/#3482 already handled for DSv3. The H100.8 CI was red on these three. This is the **pure-eager path** (base `Trainer`, no compile/trace): - Loss strings are **unchanged** → low-order numeric drift, not a real break. - `test_aot_fx_trace_vs_eager` still passes → the trace path stays bitwise-identical to eager; only the absolute `model_hash`/`grad_hash` baselines were stale. ## How the new hashes were obtained - **Qwen3 MoE** / **Qwen3 MoE FlexAttn**: regenerated on a local H100 and verified **bitwise-equal to the CI nightly (cu130)** `model_hash`, so their `grad_hash` is authoritative. - **Llama3 FlexAttn**: local (CUDA 12.8) diverges from CI (cu130) for this flex path, so both hashes were taken from the CI run. ## Validation GraphTrainer 8-GPU H100 CI green on this branch: bitwise suite **21 passed, 3 skipped** (the 3 skips are the pre-existing FlexAttn-precompile tests). Loss strings untouched. > Note (separate issue): one earlier run on this branch hit a **flaky** `qwen3_moe` FSDP+TP+EP all-to-all crash (`RuntimeError: Split sizes doesn't match total dim 0 size`) — intermittent, unrelated to this test-only change (the prior main run on #3429 passed that flavor and failed only on these same stale hashes). Worth a separate look.
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.
Summary
The two DSv3
test_eager_self_deterministictests (sdpa + FlexAttn) intest_bitwise_deterministic.pywere@unittest.skip-ped in #3432 because theirhardcoded
model_hash/grad_hashwent stale after upstream PyTorch nightlychanges (notably the MoE expert-counting switch from
histcto routing map in#3450).
This re-enables them:
EXPECTTEST_ACCEPT=1.@unittest.skipwith the@unittest.skipUnless(has_cuda_capability(9, 0), ...)gate that the Llama3 /Qwen3 siblings already use, since these numerics only match on sm_90+.
Why
These are the
eagerself-determinism guardrails (run viaTrainer, nomake_fx), so the histc/tracing regressions never applied to them — only thebaked-in expected hashes were stale. The loss is unchanged
(
7.4749956130981445for both); only the full-precisionmodel_hash/grad_hashmoved.Test
On 8×H100 (sm_90):
Both pass reproducibly against the new baselines (verified without
EXPECTTEST_ACCEPT, i.e. a true guardrail check).pre-commitclean.Note: the FlexAttention
test_precompile_vs_traceskips ("unpicklable codeobjects") are intentionally left in place — that is a separate, structural
limitation tracked elsewhere.