[https://nvbugs/6418103][fix] Clamp the post-allreduce quota by the pre-allreduce quota (`quota = min(quota… - #15991
Conversation
|
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 modifies the GPU quota calculation in KVCacheManagerV2 to clamp quota using min() against a max-token-derived value, guarding against quota inflation when SWA layers dominate. A related test waiver entry is also removed from waives.txt. ChangesKV Cache Quota Fix
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@yizhang-nv Could you please review this PR? |
|
/bot run |
|
PR_Github #57965 [ run ] triggered by Bot. Commit: |
|
PR_Github #57965 [ run ] completed with state
|
|
/bot run |
1 similar comment
|
/bot run |
|
PR_Github #58157 [ run ] triggered by Bot. Commit: |
87521a8 to
03be757
Compare
|
PR_Github #58157 [ run ] completed with state |
03be757 to
5ddd0da
Compare
The token<->quota round-trip in KVCacheManagerV2.__init__ is not an identity when SWA layers dominate the layer set (i.e. full_attn_size_per_token == 0). For gpt-oss-120b disagg with max_attention_window=[128, 32768], all layers are treated as SWA and the reverse map inflates size_per_batch by max_batch_size, blowing quota from 115.83 GiB up to 1156.5 GiB. cuMemCreate then fails with CU_ERROR_OUT_OF_MEMORY. allreduce(MIN) must never raise the local quota. Clamp the post-sync value by the pre-sync value to preserve that invariant. Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
5ddd0da to
95dbcc0
Compare
|
/bot run |
|
PR_Github #58246 [ run ] triggered by Bot. Commit: |
|
PR_Github #58246 [ run ] completed with state
|
|
/bot run |
|
/bot run --extra-stage "DGX_B300-4_GPUs-PyTorch-Post-Merge-1" |
|
PR_Github #58356 [ run ] triggered by Bot. Commit: |
|
PR_Github #58357 [ run ] triggered by Bot. Commit: |
|
PR_Github #58356 [ run ] completed with state |
|
PR_Github #58357 [ run ] completed with state
|
|
[by Codex] @yizhang-nv Could you review this PR? Thanks! |
|
Wait for #16186 to waive tests before rerun pipeline. |
|
/bot run --extra-stage "DGX_B300-4_GPUs-PyTorch-Post-Merge-1" |
|
PR_Github #58484 [ run ] triggered by Bot. Commit: |
|
PR_Github #58484 [ run ] completed with state |
The KV Cache Manager V2 quota-inflation OOM on multi-GPU VSWA (variable sliding-window attention) configurations -- a regression from NVIDIA#15633 -- was fixed on main by a parallel effort, NVIDIA#15991 (nvbugs/6418103), which clamps the post-allreduce quota by the pre-allreduce quota so the cross-rank normalization can only reduce, never over-commit. That fix landed without a test guarding the V2 + VSWA path. This change amends the missing coverage. Parametrize TestGPTOSS::test_eagle3_vswa_reuse_4gpus over v2_kv_cache so the previously-uncovered V2 path (GPT-OSS-120B, TP=4, max_attention_window=[128, 32768], free_gpu_memory_fraction=0.4) runs and guards against regressing the fix -- this variant OOM'd before NVIDIA#15991. The v2_kv_cache + two-model combination is skipped (V2 is not compatible with two-model overlap scheduling). Register the new variants in llm_function_core.txt and llm_function_rtx6k.txt. Signed-off-by: Yueh-Ting Chen <yuehtingc@nvidia.com>
Summary
_get_max_tokens_from_quotaand_get_quota_from_max_tokensare not inverses whenfull_attn_size_per_token == 0(all layers SWA per test'smax_attention_window=[128, 32768]), so the intended cross-rank normalization inflates the KV cache GPU quota ~10× (115.83 → 1156.5 GiB) and cuMemCreate OOMs.quota = min(quota, _get_quota_from_max_tokens(max_tokens))) — allreduce(MIN) must never raise the local quota. Also remove the corresponding waiver fromtests/integration/test_lists/waives.txt.Test plan
Links
Summary by CodeRabbit