Repository navigation
dsv4.1: candidate indexer library - #39671
Conversation
cd871a9 to
5d4ff35
Compare
39eb6b0 to
1e6aa3d
Compare
5d4ff35 to
fa6de8d
Compare
1e6aa3d to
ba3d003
Compare
fa6de8d to
1b0df82
Compare
ba3d003 to
0d3de26
Compare
1b0df82 to
5fc2f85
Compare
0d3de26 to
135a179
Compare
5fc2f85 to
68e3229
Compare
135a179 to
7094b98
Compare
68e3229 to
9a61194
Compare
7094b98 to
5565db3
Compare
9a61194 to
76e77b6
Compare
c9b8570 to
ed29816
Compare
266b240 to
1333f2a
Compare
…ame low-ratio metadata fields
flash_c2_decode_kernel loads the RoPE frequencies twice for the same thread and the same position: once right after the norm weight, and again inside the `tx >= kNopeThreads` branch that consumes them. `freq` is never read between the two, so the first load is dead and the second re-issues the same 8 bytes per lane. Keep the early load -- it is issued before the softmax and the RMSNorm reduction, so its latency overlaps that work -- and remove the reload inside the branch. Verified bit-exact on GB300 (sm_103) against the pre-change kernel: identical sha256 of `out`, the paged cache and the pair-state ring for V4, V41 and V41_FP4 decode plus a draft_len=4 verify batch, with the JIT cache cleared between runs. A deliberate eps perturbation was used as a negative control to confirm the harness recompiles and detects kernel changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The abstraction split ( 1.
|
…_quant next to the kernels; align compress kernel names
…guard row-id growth in capture
…s; row ids on the instance
|
/rerun-test test/registered/kernels/ops/attention/test_dsa_indexer.py test/registered/kernels/ops/attention/test_sm120_paged_mqa_logits.py test/registered/unit/layers/test_dsv4_nonpaged_indexer.py test/registered/kernels/ops/attention/test_dsv4_indexer_quant.py |
|
Results for 🚀 🚀 🚀 |
|
/tag-and-rerun-ci |
Summary
candidate_topk_blocksbest blocks of 8, the layers after it score and select only inside those blocks.candidate_indexer.py:IndexerInputsas the per-layer operand bundle,make_candidate_indexer, and the mask helpers (CandidateMasks,select_candidate_blocks,mask_topk_scores) the Hopper decode and prefill paths select through.candidate_indexer_deep_gemm.py:DeepGemmCandidateIndexer(publish_decode/select_decode), the Blackwell implementation on DeepGEMM's paged sparse MQA logits. Publishing runs the block selection (candidate_row_lens,amax8_varlen,sort_candidate_blocks, DeepGEMM schedule) on a side stream behind the layer's own top-k; the publishedSparseBlockTablecarries areadyevent andrecord_streams its buffers for the main-stream consumers.indexer.py:deep_gemm_fp4_paged_mqa_logitsandtopk_transform_paged_from_metadatajoin the existing wrapper block; existing definitions unchanged.configurer.py:DEEPGEMM_PAGED_SPARSE_MQA_LOGITSprobes the installed DeepGEMM forget_paged_sparse_mqa_logits_metadata/fp8_fp4_paged_sparse_mqa_logits; on Blackwellmake_candidate_indexerrequires them (sgl-deep-gemm 0.2.0, the pinned version, has both) instead of falling back.Changes to existing kernels
candidate_blocks.py: the mask-path kernels (candidate_block_logitsand its Triton helpers) had no caller and are removed;candidate_row_lensis unchanged.indexer_postprocess.py(filter_topk_pages) had no caller and is removed.Verification
amax_topk_blocksagainst a torch block-max reference, and paired verify rows against unpaired rows through DeepGEMM's sparse logits andtopk_transform_sparse, both pass on sgl-deep-gemm 0.2.0.make_candidate_indexerreturnsNonefor models without a candidate source and raises a clear error when the DeepGEMM build lacks the sparse APIs.CI States
Latest PR Test (Base): 🚫 Run #35155455731
Latest PR Test (Extra): ❌ Run #35155455538
Latest PR Test (AMD ROCm 10): 🚫 Run #35155455880