Conversation
Pad packed-reader queries to a complete 16-head tile when a full tile and a remainder would otherwise launch separately. TP9 uses 99 effective heads, padded to 112; discard only zero padding before the DCP output reduction. Preserve ordinary FP8 tile geometry. Validation: 47 adapter tests pass on SM120. Six four-row kernel cases at 2048, 8192, and 16384 local tokens retain identical output and LSE digests for the 99 valid heads under 104-to-112 padding. Repair inherited test fixtures to use the implemented KV shard accessor and balanced-plan threshold. Co-authored-by: OpenAI Codex <noreply@openai.com> Signed-off-by: g0san <myshytf@gmail.com>
|
Superseded by local-inference-lab/vllm#644 at commit That pull request now contains the packed-reader TP9/DCP9 99-to-112 head-tile |
|
Frozen-runtime overlay validation for the equivalent vLLM local-inference-lab#644 commit This draft has no implementation absent from vLLM local-inference-lab#644, so it is now closed to |
Packed Kimi-K3 attention under TP9/DCP9 gathers 99 effective query heads. Padding those heads to 104 leaves an eight-head remainder for the packed reader's 16-head tiles, causing two successive kernel launches per MLA layer. Pad to 112 and remove the zero heads before the DCP output/LSE reduction, so every effective head executes in one launch.
The ordinary E4M3 reader retains its eight-head geometry. Packed inputs with at most one tile do not acquire an unnecessary additional tile. Target weights, KV records, visible tokens, and valid-head arithmetic are unchanged.
This is a focused change over
integration/k3-packed-mla-reader-20260908. That integration branch composes the DFlash2 serving source with the existing reader controls from lab vLLM #644, which depends on B12X #311. Those PRs implement reader execution and split controls; this PR addresses the separate TP9 head-tail launch cost. Searches of open packed-MLA/head-padding PRs found no existing implementation of this Kimi packed-reader tile change.Validation on RTX PRO 6000 Blackwell, vLLM
fa6ea71c01fd, B12X0bf9f177b237:pytest -q --confcutdir=tests/v1/attention tests/v1/attention/test_b12x_mla.py: 47 passed, including packed/BF16 queries at 64 and 99 effective heads.Status: implemented; kernel, cache-serving, and concurrency-one context-sweep checks qualified.
The frozen default-prompt benchmark (30 seconds per cell, K=3) measures 64.21/70.42/72.81 output tokens/s at 16/32/64 Ki context, versus 61.14/61.53/62.28 before the packed-reader integration. Inferred verification rate improves 13.7–13.9% across those contexts. These numbers include the vector-load reader dependency and this head-padding change; each arm is one unseeded sweep. The 128 Ki candidate measures 68.90 tokens/s, but there is no valid baseline: the baseline client produced zero tokens while the benchmark's global-counter fallback attributed another request's throughput to it. Any earlier 128 Ki gain claim is withdrawn. At approximately 64 Ki, rank-zero target graph duration is 30.85 versus 35.35 ms, packed MLA kernel sum is 2.83 versus 7.50 ms per step, and the draft remains about 2.14 ms. The packed reader executes 96 rather than 192 launches across four steps and 24 layers.
OpenAI Codex assisted with implementation, PR review, and validation under the operator's direction. This draft requests human review before merge. No model payload, private request capture, or generated trace is included.