Skip to content

Kimi k3 kvcmv2 - #17078

Closed
SimengLiu-nv wants to merge 12 commits into
NVIDIA:feat/kimi_k3from
SimengLiu-nv:kimi_k3-kvcmv2
Closed

SimengLiu-nv wants to merge 12 commits into
NVIDIA:feat/kimi_k3from
SimengLiu-nv:kimi_k3-kvcmv2

Conversation

@SimengLiu-nv

Copy link
Copy Markdown
Collaborator

@coderabbitai summary

Description

Test Coverage

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

VALLIS-NERIA and others added 8 commits July 29, 2026 19:19
…VIDIA#16427)

Signed-off-by: Xiwen Yu <[email protected]>
(cherry picked from commit bb90835)
Signed-off-by: Simeng Liu <[email protected]>
Signed-off-by: Jiagan Cheng <[email protected]>
(cherry picked from commit fd9c32f)
Signed-off-by: Simeng Liu <[email protected]>
…gerV2 & agentic prefix caching (NVIDIA#16598)

Signed-off-by: Xiwen Yu <[email protected]>
(cherry picked from commit d6a2d25)
Signed-off-by: Simeng Liu <[email protected]>
dongfengy and others added 4 commits July 31, 2026 09:11
…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]>
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]>
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