fix(collector): align model dtype for vLLM FlashInfer fp8 KV attention#1382
fix(collector): align model dtype for vLLM FlashInfer fp8 KV attention#1382kaim-eng wants to merge 1 commit into
Conversation
FlashInferMetadataBuilder asserts kv_cache_spec.dtype == model_config.dtype. During B200 vLLM 0.22.0 power collection, fp8 KV + head_dim=128 routes to FLASHINFER while model_config stayed bfloat16, aborting every case. Set model_config.dtype from the KV cache spec before builder init when fp8 KV is enabled.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (6)
🧰 Additional context used📓 Path-based instructions (6){collector/**,tests/unit/collector/**}📄 CodeRabbit inference engine (.claude/rules/collector/failure_handling.md)
Files:
collector/**📄 CodeRabbit inference engine (.claude/rules/generator/cross_module_impact.md)
Files:
⚙️ CodeRabbit configuration file
Files:
collector/**/*.py📄 CodeRabbit inference engine (.claude/rules/collector/case_authoring.md)
Files:
**/*📄 CodeRabbit inference engine (.claude/rules/repo-guide.md)
Files:
⚙️ CodeRabbit configuration file
Files:
collector/**/*📄 CodeRabbit inference engine (.claude/rules/repo-guide.md)
Files:
**/*.{py,pyi}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (3)📚 Learning: 2026-02-28T11:44:28.109ZApplied to files:
📚 Learning: 2026-07-05T07:16:31.423ZApplied to files:
📚 Learning: 2026-07-11T03:07:50.673ZApplied to files:
🔇 Additional comments (1)
WalkthroughUpdates the FlashInfer attention path so FP8 KV-cache execution synchronizes ChangesFlashInfer dtype alignment
Estimated code review effort: 1 (Trivial) | ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Comment |
Summary
collector/vllm/collect_attn.py: When fp8 KV cache is enabled and vLLM routes attention toFLASHINFER, alignvllm_config.model_config.dtypewithkv_cache_spec.dtypebeforeFlashInferMetadataBuilderinit. vLLM 0.22 asserts these dtypes match; the collector's KV spec uses fp8 whilemodel_configstayed bfloat16, causingAssertionErroron every fp8+head_dim=128 case on SM100.Context
Discovered during B200 vLLM
0.22.0power re-collection (R2). fp8+head_dim=192 used a different backend and did not hit this path. Targeted re-collect with this WAR produced 11,288 context + 11,333 generation rows (job3137493,umb-b200-236).Independent of #1358 (helper + TRT-LLM MLA API) and #1359 (TRT-LLM kernel-limit FIXME comments).
Test plan
pytest tests/unit/collector/test_vllm_collect_attn.py -m unitcollector/collect.py --backend vllm --ops attention_generation --case-filter "128, True" --smokeon vLLM 0.22.x + SM100 — confirm fp8+head_dim=128 cases run without FlashInfer dtype assertSummary by CodeRabbit