[https://nvbugs/6701493][fix] Limit Gemma3 FP8 accuracy test KV cache memory fraction - #18523
[https://nvbugs/6701493][fix] Limit Gemma3 FP8 accuracy test KV cache memory fraction#18523erictsai-nv wants to merge 4 commits into
Conversation
… memory fraction Signed-off-by: Eric Tsai <ertsai@nvidia.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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. WalkthroughThe Gemma 3 27B FP8 accuracy test moves KV-cache memory-headroom comments above the ChangesGemma FP8 accuracy test
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This test-only change reduces Gemma3 FP8 KV cache allocation to preserve runtime memory headroom; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ruodil
left a comment
There was a problem hiding this comment.
Review summary - Approve
Reviewed the full diff; no blocking or major issues found.
Left 1 non-blocking note(s) inline on the diff:
- [MINOR]
tests/integration/defs/accuracy/test_llm_api_pytorch.py:1406- free_gpu_memory_fraction=0.5 is an unexplained magic value in the test
Minor, non-blocking notes:
tests/integration/defs/accuracy/test_llm_api_pytorch.py: Halving the KV cache pool can reduce concurrency and lengthen this test- Dropping the KV cache pool from ~0.9 to 0.5 of free memory (per the PR description, ~42.4 GiB -> ~23.6 GiB) halves the number of resident KV blocks. Since
enable_block_reuse=Falseandenable_partial_reuse=Falseare also set on lines 1403-1404, every request pays full prefill and holds its own blocks, so the achievable in-flight batch size for MMLU is bounded directly by this pool. The concrete effect: MMLU/GSM8K on the 27B FP8 model will schedule fewer requests per iteration and the wall-clock oftest_fp8_prequantizedgrows, which matters because this test already runs under a 3600s timeout in the reproducer command. This is not a correctness problem and should not block, but if post-merge L0 starts timing out on this test rather than OOM-ing, this line is the cause — the fix would then be a targetedmax_batch_size/max_num_tokenscap plus a modest fraction rather than a single blunt 0.5.
- Dropping the KV cache pool from ~0.9 to 0.5 of free memory (per the PR description, ~42.4 GiB -> ~23.6 GiB) halves the number of resident KV blocks. Since
Automated review by NVCortex Lite, run by @ruodil.
Co-authored-by: ruodil <200874449+ruodil@users.noreply.github.com> Signed-off-by: erictsai-nv <ertsai@NVIDIA.com>
Removed duplicate dtype assignment in kv_cache_config. Signed-off-by: erictsai-nv <ertsai@NVIDIA.com>
Signed-off-by: Eric Tsai <ertsai@nvidia.com>
|
/bot run --stage-list "DGX_H100-PyTorch-Post-Merge-2" |
|
PR_Github #70871 [ run ] triggered by Bot. Commit: |
|
PR_Github #70871 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #70917 [ run ] triggered by Bot. Commit: |
|
PR_Github #70917 [ run ] completed with state |
|
Closing in favor of #18557, which fixes the underlying FlashInfer plan-cache growth. |
Dev Engineer Review
free_gpu_memory_fraction=0.5inKvCacheConfig.dtypeassignment inkv_cache_config.QA Engineer Review
tests/integration/defs/accuracy/test_llm_api_pytorch.py.tests/integration/test_lists/coverage change was reported.Description
The Gemma3 27B FP8 accuracy test can run out of memory during MMLU on an H100 even with
max_seq_len=4096because the default KV cache allocation reserves 90% of free GPU memory and leaves insufficient dynamic PyTorch headroom.This test-only change sets
free_gpu_memory_fraction=0.5in the FP8 test'sKvCacheConfig, matching the limit already used by the Gemma3 BF16 test. In the reproduced failure environment, this reduced the final KV cache quota from approximately 42.38 GiB to 23.55 GiB and prevented the runtime OOM without changing product defaults or allocator behavior.Test Coverage
python3 -m pytest -vs --timeout-method=thread --timeout=3600 accuracy/test_llm_api_pytorch.py::TestGemma3_27BInstruct::test_fp8_prequantizedPR Checklist
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.