[None][test] KV cache manager v2: add V2 + VSWA multi-GPU test coverage#16114
Conversation
|
/bot run --disable-fail-fast |
📝 WalkthroughWalkthroughAdds a safeguard to KVCacheManagerV2 that clamps per-rank quota to prevent increases across ranks during multi-rank initialization, logging a warning when the normalized quota exceeds the existing quota. Also extends the eagle3_vswa_reuse_4gpus test and QA lists to cover v1/v2 KV cache manager variants. ChangesKV Cache Manager V2 Quota Fix and Test Coverage
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
PR_Github #58210 [ run ] triggered by Bot. Commit: |
|
/bot run --disable-fail-fast |
|
PR_Github #58213 [ run ] triggered by Bot. Commit: |
|
PR_Github #58210 [ run ] completed with state |
|
/bot run --post-merge --disable-fail-fast --stage-list "DGX_B200-4_GPUs-PyTorch-Post-Merge-*" |
|
PR_Github #58233 [ run ] triggered by Bot. Commit: |
|
PR_Github #58213 [ run ] completed with state |
|
PR_Github #58233 [ run ] completed with state
|
|
/bot run --disable-fail-fast --extra-stage "DGX_B200-4_GPUs-PyTorch-Post-Merge-1" |
|
PR_Github #58361 [ run ] triggered by Bot. Commit: |
|
[by Codex] @yizhang-nv Could you review this PR? Thanks! |
|
PR_Github #58361 [ run ] completed with state
|
|
/bot run --disable-fail-fast --extra-stage "DGX_B200-4_GPUs-PyTorch-Post-Merge-1" |
|
PR_Github #58435 [ run ] triggered by Bot. Commit: |
|
PR_Github #58435 [ 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>
Add test_eagle3_vswa_reuse_4gpus (v1/v2 x one/two model) to l0_dgx_b200.yml, next to the sibling test_eagle3_4gpus, so the V2 + VSWA path runs in the DGX_B200-4_GPUs-PyTorch-Post-Merge stage on Blackwell and guards the quota-inflation fix post-merge. Signed-off-by: Yueh-Ting Chen <yuehtingc@nvidia.com>
29a40fe to
f06d474
Compare
|
/bot skip --comment "Previous CI gain success. Now that #15991 landed before this MR does, we are purely adding test coverage now. Safe to skip CI." |
|
PR_Github #58619 [ skip ] triggered by Bot. Commit: |
|
PR_Github #58619 [ skip ] completed with state |
Description
Background: the bug that #15991 fixed
With
world_size > 1,KVCacheManagerV2.__init__normalizes the per-rank GPUbyte
quotaacross ranks by converting quota → tokens, taking an all-reduceMIN, then converting back. The back-conversion could raise the quota abovethe requested budget: when the per-rank budget is below the fixed per-batch
sliding-window generation floor
(
max_batch_size * generation_swa_size_per_request),_get_max_tokens_from_quotareturns0, and_get_quota_from_max_tokens(0)returns exactly that floor — a value independent of
free_gpu_memory_fraction.The inflated quota then drove eager KV pool allocation past available memory →
CuOOMError, reproducing only on V2 + VSWA +world_size > 1. Regression from#15633.
#15991 clamps the normalized quota to the incoming quota
(
quota = min(quota, self._get_quota_from_max_tokens(max_tokens))) so thecross-rank step can only reduce, never over-commit.
Test Coverage (this PR)
The landed fix went in without a test guarding the V2 + VSWA path. This PR adds
it.
accuracy/test_llm_api_pytorch.py::TestGPTOSS::test_eagle3_vswa_reuse_4gpusisnow parametrized over
v2_kv_cache, adding the previously-uncovered V2 path:test_eagle3_vswa_reuse_4gpus[v2_kv_cache-one_model]— exercises the fixedpath (GPT-OSS-120B, TP=4,
max_attention_window=[128, 32768],free_gpu_memory_fraction=0.4); this variant OOM'd before [https://nvbugs/6418103][fix] Clamp the post-allreduce quota by the pre-allreduce quota (`quota = min(quota… #15991.test_eagle3_vswa_reuse_4gpus[v1_kv_cache-one_model],test_eagle3_vswa_reuse_4gpus[v1_kv_cache-two_model]— existing V1 coverage,renamed by the new axis.
The
v2_kv_cache+ two-model combination is skipped (V2 is not compatible withtwo-model overlap scheduling).
Registered in:
tests/integration/test_lists/qa/llm_function_core.txttests/integration/test_lists/qa/llm_function_rtx6k.txttests/integration/test_lists/test-db/l0_dgx_b200.yml— runs the V2 + VSWApath in the
DGX_B200-4_GPUs-PyTorch-Post-Mergestage on Blackwell to guardthe fix post-merge.
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths.
No API changes (no
api-compatible/api-breakinglabel needed).No new dependencies.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.