Skip to content

Commit 435aecd

Browse files
authored
Stop running transformer-level EP overlap tests pending removal (pytorch#4343)
After pytorch#4121 folded the model batch dimension into the token dimension, `--compile.ep_overlap.module_fqn layers.*` no longer splits between independent sequences. Dimension 0 is now the packed token stream, so halving it cuts through whatever document straddles the midpoint and neither chunk retains full attention context. Every test that actually executes a transformer-chunked graph fails as a result. The regional-Inductor H100 integration variant aborts at step 1 with a non-finite loss; the full-Inductor variant aborts before step 1 on a Triton index-out-of-bounds assertion; and the distributed eager-vs-graph loss comparison fails in its eager baseline run. Mark the loss comparison xfail and disable the two integration variants. MoE-level chunking is unaffected and stays enabled. MoE is a per-token function, so folding does not change its chunk semantics, and both the moe_batch and moe_seq loss comparisons still pass. Transformer-level chunking is tracked for removal in pytorch#4342.
1 parent e8e39ab commit 435aecd

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

‎torchtitan/experiments/graph_trainer/tests/integration_tests.py‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,17 @@ def _build_llama3_tests() -> list[OverrideDefinitions]:
267267
def _build_deepseek_v3_tests() -> list[OverrideDefinitions]:
268268
"""DeepSeek-v3-based integration tests (require H100 machines)."""
269269
ep_overlap_flex_tests = [
270+
# TODO(#4342): Remove transformer-level chunking. After the model batch
271+
# dimension was folded into the token dimension, splitting `layers.*`
272+
# in half cuts the packed token stream mid-document, so neither chunk
273+
# has full attention context. This variant aborts at step 1 with a
274+
# non-finite loss.
270275
(
271276
"regional",
272277
"batch",
273278
"layers.*",
274279
"transformer_batch",
275-
False,
280+
True,
276281
),
277282
(
278283
"regional",
@@ -288,12 +293,16 @@ def _build_deepseek_v3_tests() -> list[OverrideDefinitions]:
288293
"moe_seq",
289294
True,
290295
),
296+
# TODO(#4342): Remove transformer-level chunking, as above. Under full
297+
# Inductor the mid-document split surfaces earlier than the non-finite
298+
# loss: this variant aborts before step 1 on a Triton index-out-of-
299+
# bounds assertion.
291300
(
292301
"full",
293302
"batch",
294303
"layers.*",
295304
"transformer_batch",
296-
False,
305+
True,
297306
),
298307
(
299308
"full",

‎torchtitan/experiments/graph_trainer/tests/test_numerics.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,11 @@ def test_moe_dsv3_aot_fx_trace_vs_eager(self):
606606
),
607607
)
608608

609+
# TODO(#4342): Remove transformer-level chunking. After the model batch
610+
# dimension was folded into the token dimension, splitting `layers.*` in
611+
# half cuts the packed token stream mid-document, so neither chunk has full
612+
# attention context and the loss goes non-finite at step 1.
613+
@unittest.expectedFailure
609614
def test_moe_dsv3_ep_overlap_aot_fx_trace_vs_eager_chunked(self):
610615
self.assertTrue(_run_deepseek_v3_ep_overlap_loss_compare())
611616

0 commit comments

Comments
 (0)