[https://nvbugs/6261164][fix] When spec_config is None, allocate a 1-slot placeholder for… - #14936
[https://nvbugs/6261164][fix] When spec_config is None, allocate a 1-slot placeholder for…#14936tensorrt-cicd wants to merge 1 commit into
Conversation
…/conv state buffers SSM/conv attention backends unconditionally register intermediate spec-decoding state buffers (SpecSSMResourceHandler/SpecCausalConvResourceHandler) via get_cache_initializers. When speculative decoding is disabled (spec_config is None) these buffers are never bound into the managed cache views, so they fall through to _allocate_unmanaged_state_resource and each gets a full max_num_state_slots-sized allocation. For Nemotron-Nano-9B-v2-FP8 (27 SSM + 27 conv layers) this wastes tens of GB on dead buffers and OOMs on a 44 GiB L40S. Bind a 1-slot placeholder for these never-read buffers when spec decoding is off, keeping the cache slot present without the full allocation. Signed-off-by: tensorrt-cicd <90828364+tensorrt-cicd@users.noreply.github.com>
|
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 (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR optimizes speculative decoding state buffer allocation in the auto-deploy shim layer. When speculative config is disabled with speculative SSM/Conv handlers, the allocator now uses a 1-slot placeholder instead of full buffer allocation, reducing unnecessary memory overhead. A previously-waived integration test is re-enabled, confirming the fix works. ChangesSpeculative buffer allocation and test enablement
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Surely we can do this without allocating any memory. I will reprompt the bot |
Summary
Test plan
Links
Summary by CodeRabbit