Conversation
|
/rerun-test test/registered/kernel/attention/test_dsa_multi_ctas_counter.py test/registered/e2e/models/test_glm53_flash_b200.py test/registered/e2e/models/test_dsa_glm52_nvfp4_tp_mtp.py |
|
Results for 🚀 🚀 |
|
Results for 🚀 🚀 |
Motivation
DeepseekSparseAttnBackend._forward_trtllmrebound the counter buffer:grow_..._if_neededreturns a newtorch.zeroswhen it grows, so the assignment frees the buffer the decode CUDA graphs captured. Later replays write through a dangling pointer.batch_sizeispage_table_1.shape[0]— query rows, not requests — so a prefill batch trips it, not decode. Reasoning in decode batch sizes (max_running_requests x draft_tokens) makesTRTLLM_MLA_MAX_BATCH_SIZE=8192look unreachable, which is why it hid.Stock main, default flags, GLM-5.3-Flash tp4 / 4x GB300, 8192 in / 1024 out, temporary logging on all 4 ranks:
Last capture ended 22 s before the first grow. Latent, not benign: a probe right after the grow did not land on the freed block, so today the stale writes hit memory nothing owns. Perturb the allocation pattern and it becomes a reproducible illegal access inside
fmhaSm100fKernel...DynamicTokenSparse, the kernel that consumes the counter.Modifications
_multi_ctas_kv_counter_for_ensure_multi_ctas_kv_counter_capacityinit_cuda_graph_statesizes formax(max_bs, max_num_tokens)before any capture; grow-only= Noneinit_cuda_graph_statesizes it for every backend, but only the TRT-LLM branch allocates oneCapture-time growth is then unreachable, and the assert guarding it is an invariant check rather than a live path.
Accuracy Tests
Not applicable — buffer lifetime only, no numerics touched.
Benchmarking and Profiling
GLM-5.3-Flash tp4 / 4x GB300, 8192 in / 1024 out, 3 runs each, same build:
TTFT is the number at risk (the oversized path now allocates per call across 11 DSA layers), so it was measured rather than assumed. All inside noise.
Checklist
test/registered/kernel/attention/test_dsa_multi_ctas_counter.py, 7 cases2 / 1 / 1failures,7passed unmutatedcheck_registered_tests.pyandgit diff --checkexit 0CI States
Latest PR Test (Base): ❌ Run #34830045556
Latest PR Test (Extra): ❌ Run #34830045213
Latest PR Test (AMD ROCm 10): ❌ Run #34830045737