Skip to content

[https://nvbugs/6018046][fix] Lower throughput_pp4_mtp max_batch_size to 8 - #14585

Closed
tianyuxbear wants to merge 1 commit into
NVIDIA:mainfrom
tianyuxbear:fix/6018046
Closed

[https://nvbugs/6018046][fix] Lower throughput_pp4_mtp max_batch_size to 8#14585
tianyuxbear wants to merge 1 commit into
NVIDIA:mainfrom
tianyuxbear:fix/6018046

Conversation

@tianyuxbear

@tianyuxbear tianyuxbear commented May 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes TestDeepSeekR1::test_nvfp4_multi_gpus[throughput_pp4_mtp] (NVBug 6018046) by lowering max_batch_size from 32 to 8 to match the already-stable throughput_bs8_mtp configuration. The matching waiver entry is removed.

Root cause

On 4-GPU PP=4 + MTP topology, max_batch_size=32 causes the per-bs CUDA-graph snapshot pool (32 captured graphs) plus per-step activation and NCCL collective buffers to exhaust the physical headroom needed by the lazy cudaMalloc from cuBLAS Lt workspace (DeepseekV3 router GEMM, attention o_proj) on B300. With the default 0.70 KV cache fraction allocating ~100 GiB / rank, only ~3 GiB of physical free pool remains for cuBLAS Lt / NCCL workspaces, which is insufficient under sustained load. The failure manifests as mid-run CUBLAS_STATUS_EXECUTION_FAILED followed by an asynchronous illegal memory access.

Relation to #14201

#14201 fixes the same bug by combining max_batch_size 32→8 with free_gpu_memory_fraction 0.70→0.50. Through isolated controlled experiments I verified the KV-fraction change is not strictly required once bs is lowered:

Experiment bs KV fraction Result
upstream/main baseline 32 0.70 ❌ crash @ req 1254/4104 (router GEMM)
bs=16 only 16 0.70 ❌ crash @ req 1502/4104 (o_proj GEMM)
This PR (3 runs) 8 0.70 ✅ pass (531s / 543s / 735s)
#14201 (1 run) 8 0.50 ✅ pass (618s)

At bs=8 the per-bs CUDA-graph pool and per-step activation footprint shrink by 4x, restoring enough physical free pool for the lazy cuBLAS Lt / NCCL workspaces even at the default 0.70 KV fraction. This PR is therefore a minimal single-knob alternative to #14201.

Test plan

  • pytest accuracy/test_llm_api_pytorch.py::TestDeepSeekR1::test_nvfp4_multi_gpus[throughput_pp4_mtp] passes 3/3 on B300 4-GPU
  • Waiver entry removed; no runtime / kernel / LLM-API code touched

Summary by CodeRabbit

  • Tests
    • Modified GPU testing configuration parameters, including batch size and KV cache memory allocation adjustments, to improve stability and compatibility when executing tests across multiple GPUs
    • Re-enabled a previously skipped multi-GPU test scenario, ensuring comprehensive test coverage for GPU testing configurations following improvements to GPU resource management and workspace handling compatibility

Review Change Stack

@tianyuxbear
tianyuxbear requested a review from a team as a code owner May 26, 2026 16:12
… to 8

The throughput_pp4_mtp variant uses pp_size=4 + ep_size=1 + mtp_nextn=1
on a 4-GPU topology. With max_batch_size=32 (every other 4-GPU variant
in this test uses bs<=16), the per-bs CUDA-graph snapshot pool plus
per-step activation and NCCL collective buffers leave no headroom for
the lazy cuBLAS Lt workspace allocation. Under sustained load this
surfaces as mid-run CUBLAS_STATUS_EXECUTION_FAILED in the DeepseekV3
router / o_proj GEMMs, followed by an asynchronous illegal memory
access.

Lower max_batch_size from 32 to 8 to match the already-stable
throughput_bs8_mtp configuration. With bs=8 the default 0.70 KV
cache fraction provides sufficient cuBLAS workspace headroom; the
test passes in repeated runs without any KV fraction reduction.

Removes the matching waiver entry.

Signed-off-by: Tianyu Xiong <117647511+tianyuxbear@users.noreply.github.com>
@tianyuxbear tianyuxbear changed the title [nvbugs/6018046][fix] Lower throughput_pp4_mtp max_batch_size to 8 [https://nvbugs/6018046][fix] Lower throughput_pp4_mtp max_batch_size to 8 May 26, 2026
@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8f57dfec-3958-4c9d-874e-f45322715924

📥 Commits

Reviewing files that changed from the base of the PR and between 1f8312d and 69da278.

📒 Files selected for processing (2)
  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
  • tests/integration/test_lists/waives.txt
💤 Files with no reviewable changes (1)
  • tests/integration/test_lists/waives.txt

📝 Walkthrough

Walkthrough

This PR adjusts a single test parameter in the DeepSeekR1 GPU test suite. The max_batch_size for the throughput_pp4_mtp configuration is reduced from 32 to 8, documented with comments about a cuBLAS/cuBLASLt workspace issue, and the corresponding test waive entry is removed.

Changes

Batch size adjustment for throughput_pp4_mtp test

Layer / File(s) Summary
Batch size parameter, documentation, and waive removal
tests/integration/defs/accuracy/test_llm_api_pytorch.py, tests/integration/test_lists/waives.txt
Inline comments document the cuBLAS/cuBLASLt workspace headroom issue and KV cache fraction adjustment for the throughput_pp4_mtp parameter in test_nvfp4_multi_gpus. The max_batch_size for that parameter is reduced from 32 to 8. The corresponding skip waive entry is removed from the waives list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • NVIDIA/TensorRT-LLM#14503: Modifies test waive entries in tests/integration/test_lists/waives.txt for other parametrized test cases in the same accuracy test file.

Suggested reviewers

  • crazydemo
  • jieli-matrix
  • ZhanruiSunCh
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: lowering max_batch_size for the throughput_pp4_mtp configuration to fix the NVBugs issue 6018046.
Description check ✅ Passed The PR description is comprehensive with Summary, Root Cause, Relation to #14201, and Test Plan sections. It clearly explains the issue, the solution, the underlying cause, and test results. All critical sections are well-documented.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@tianyuxbear

Copy link
Copy Markdown
Collaborator Author

/bot run --extra-stage "DGX_B300-4_GPUs-PyTorch-Post-Merge-1, DGX_B300-4_GPUs-PyTorch-Post-Merge-2" --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50365 [ run ] triggered by Bot. Commit: 61e4add Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50365 [ run ] completed with state FAILURE. Commit: 61e4add
/LLM/main/L0_MergeRequest_PR pipeline #39892 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@tianyuxbear

Copy link
Copy Markdown
Collaborator Author

/bot run --extra-stage "DGX_B300-4_GPUs-PyTorch-Post-Merge-1, DGX_B300-4_GPUs-PyTorch-Post-Merge-2" --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50420 [ run ] triggered by Bot. Commit: 61e4add Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50420 [ run ] completed with state SUCCESS. Commit: 61e4add
/LLM/main/L0_MergeRequest_PR pipeline #39944 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@tianyuxbear

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50504 [ run ] triggered by Bot. Commit: 61e4add Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50504 [ run ] completed with state SUCCESS. Commit: 61e4add
/LLM/main/L0_MergeRequest_PR pipeline #40012 completed with status: 'SUCCESS'

CI Report

Link to invocation

@tianyuxbear

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_B300-4_GPUs-PyTorch-Post-Merge-2"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50532 [ run ] triggered by Bot. Commit: 61e4add Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50532 [ run ] completed with state SUCCESS. Commit: 61e4add
/LLM/main/L0_MergeRequest_PR pipeline #40039 (Partly Tested) completed with status: 'SUCCESS'

CI Report

Link to invocation

@tianyuxbear

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

1 similar comment
@tianyuxbear

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50660 [ run ] triggered by Bot. Commit: 61e4add Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50660 [ run ] completed with state SUCCESS. Commit: 61e4add
/LLM/main/L0_MergeRequest_PR pipeline #40150 completed with status: 'SUCCESS'

CI Report

Link to invocation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants