Skip to content

[None][fix] Skip corrupt Bfloat16 MxE2m1MxE4m3 splitK2 MOE kernels - #17105

Merged
brnguyen2 merged 1 commit into
NVIDIA:feat/kimi_k3from
dongfengy:dfy/skip-corrupt-moe-splitk-cubins
Jul 31, 2026
Merged

brnguyen2 merged 1 commit into
NVIDIA:feat/kimi_k3from
dongfengy:dfy/skip-corrupt-moe-splitk-cubins

Conversation

@dongfengy

@dongfengy dongfengy commented Jul 31, 2026 •

Copy link
Copy Markdown
Collaborator

So what's happening is that AgentX TEP16 Conc4 sometimes crashes. Initially I thought it's FP8 KV specific. Turned out this is just false signal due to how random it is. But TEP16 definitely increased the probability of the crash.

The investigation was done by dumping intermediate tensors (although overhead is huge due to how slow the runs are). Eventually we got to MOE, and confirmed that for MOE, perfectly reasonable inputs resulted in wrong outputs. But we couldn't reproduce it with op level tests. Luckily, looking at the patterns, my agents were able to see that only certain tactics failed.

Workload Before (baseline) With this skip
AgentX TEP16 Conc4 FP8-KV (originally failing workload, byte-identical replay) crashed 5 / 7 runs (71%) 0 / 7 runs crashed
Accelerated stress reproducer (same serving config; one round = ~4.5 min of traffic) all 17 attempts crashed, each within its first 3 rounds survived 32 consecutive rounds, zero crashes

GSM8K (default example eval, TP16): 97.27 with the skip (reference ~96).

…ubins

The splitK2 (cga 1x1x2) Bfloat16_MxE2m1MxE4m3 FC2 cubin family used by the
trtllm-gen MoE runner intermittently emits corrupted output rows (garbage
magnitudes ~1e16..1e37 mixed with non-finite values) under concurrent
serving load, with bit-identical clean inputs across ranks. This caused the
Kimi K3 TEP16 FP8-KV concurrency-4 stochastic NaN crashes (all-rank
TensorCompare device asserts). The payloads landed with the trtllm-gen cubin
refresh and are workload-implicated rather than proven intrinsically
corrupt: isolated single-GPU replays of the exact failing calls are always
clean, so the defect needs real serving concurrency to trigger.

Evidence (two independent investigations, joint):
- in-situ kernel-name logs at three failures show the executing FC2 tactic
  was a splitK2 variant; crash birth rank always matches the rank whose
  autotuner cache selected a splitK2 tactic at the failing decode shape
  (17/17 correspondence);
- removing the tactic from the cache stops the crashes; forcing it on all
  ranks produces first-round multi-rank failures;
- filtering only the two originally named payload hashes moved the failure
  to the remaining siblings with an identical instrumented signature, so
  the whole family (shared cross-CTA reduction scheme) is filtered by name.

Validation: synthetic reproducer 0 crashes in 32 rounds (baseline crashes
17/17 within 1-3 rounds); frozen original TEP16 FP8-KV conc4 workload with
the original runtime stack 0/7 crashes vs 5/7 baseline (Fisher p~0.01).
Scope: excludes 8 of 639 cubins (1.25%); FC1 and other dtype combinations
untouched. Autotuner caches must be regenerated after this change (tactic
indices shift). The filter self-documents for removal once fixed cubin
payloads ship.

Signed-off-by: Dongfeng Yu <[email protected]>

@rosong11 rosong11 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dongfengy

Copy link
Copy Markdown
Collaborator Author

/bot skip --comment "Only reduce the set of available kernels. No other functional changes. GSM8k sanity passed."

@brnguyen2
brnguyen2 merged commit 76d9b5c into NVIDIA:feat/kimi_k3 Jul 31, 2026
11 of 12 checks passed
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63047 [ ] completed with state FAILURE. Commit: 54785ae
Not allowed on merged PR

Link to invocation

SimengLiu-nv pushed a commit to SimengLiu-nv/TensorRT-LLM that referenced this pull request Aug 1, 2026
The NVIDIA#17105 filter matches Bfloat16_MxE2m1MxE4m3 && splitK, which covers
only the FC2 flavor (bf16 output). The gated FC1 kernels of the same
family emit the fp8 intermediate, so their names start
bmm_MxE4m3_MxE2m1MxE4m3_..._splitK2 and escaped the filter.

Instrumented Kimi K3 disagg 1P1D TEP16 GEN runs (pure-decode M=2-4
microbatches, GB300) reproduced the same failure signature that convicted
the FC2 family: a single rank's entire local MoE partial output turns
uniform NaN with all python-visible inputs (router logits, routed-in,
activations) verified finite in the same iteration, transient across
tens of thousands of otherwise-clean iterations, random layers. In-situ
kernel-name logs (TLLM_BATCHED_GEMM_PRINT_NAME=1) show these FC1 splitK2
cubins dispatched at the failing tileN=8 decode shapes. Transfer, block
reuse, eviction, onboard-content, KDA-state, activation-quant, and
routing hypotheses were each eliminated by direct experiment first,
including a fully serialized transfer-landing run that still failed.

Skip the FC1 flavor with an explicit second filter entry, keeping the
two families separately documented.

Signed-off-by: Dongfeng Yu <[email protected]>
brnguyen2 pushed a commit that referenced this pull request Aug 1, 2026
The #17105 filter matches Bfloat16_MxE2m1MxE4m3 && splitK, which covers
only the FC2 flavor (bf16 output). The gated FC1 kernels of the same
family emit the fp8 intermediate, so their names start
bmm_MxE4m3_MxE2m1MxE4m3_..._splitK2 and escaped the filter.

Instrumented Kimi K3 disagg 1P1D TEP16 GEN runs (pure-decode M=2-4
microbatches, GB300) reproduced the same failure signature that convicted
the FC2 family: a single rank's entire local MoE partial output turns
uniform NaN with all python-visible inputs (router logits, routed-in,
activations) verified finite in the same iteration, transient across
tens of thousands of otherwise-clean iterations, random layers. In-situ
kernel-name logs (TLLM_BATCHED_GEMM_PRINT_NAME=1) show these FC1 splitK2
cubins dispatched at the failing tileN=8 decode shapes. Transfer, block
reuse, eviction, onboard-content, KDA-state, activation-quant, and
routing hypotheses were each eliminated by direct experiment first,
including a fully serialized transfer-landing run that still failed.

Skip the FC1 flavor with an explicit second filter entry, keeping the
two families separately documented.

Signed-off-by: Dongfeng Yu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants