[https://nvbugs/6215793][fix] Thread ctx_total_kv_len through getWorkspaceSize→getWorkspaceSizeForContext… - #15000
Conversation
…total_kv_len The FP8 context-MLA K/V scratch buffers in getWorkspaceSizeForContext were sized as mChunkPrefillBufferBatchSize * max_num_tokens, but enqueueContext lays them out and invokeMLAContextFp8Quantize writes them for total_kv_len rows. Under KV-cache reuse, total_kv_len includes cached tokens, so it can exceed the estimate and overflow the K/V buffers, which sit mid-workspace and corrupt downstream slices (surfacing later as a flaky attention-workspace OOB, cublas execution failure, or illegal memory access). Thread the actual ctx_total_kv_len through getWorkspaceSize into getWorkspaceSizeForContext and size the K/V buffers for the max of the chunk-prefill bound and total_kv_len. 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 (4)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR adds ChangesWorkspace sizing update
Integration waiver list change
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
NVBug 6215793 was closed as Bug - Fixed. The repair-bot root cause matches the merged resolution #14852, so this PR is being auto-closed. If you believe this is wrong, reopen the PR — the bot will never auto-close a human-reopened PR for this cleanup generation. |
Summary
Test plan
Links
Summary by CodeRabbit
Bug Fixes
Tests