Skip to content

[https://nvbugs/6276841][fix] When torch_compile=True, pass kv_cache_config=KvCacheConfig(free_gpu_memory_fra… - #15095

Open
tensorrt-cicd wants to merge 4 commits into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6276841
Open

[https://nvbugs/6276841][fix] When torch_compile=True, pass kv_cache_config=KvCacheConfig(free_gpu_memory_fra…#15095
tensorrt-cicd wants to merge 4 commits into
NVIDIA:mainfrom
tensorrt-cicd:repair-bot-bug6276841

Conversation

@tensorrt-cicd

@tensorrt-cicd tensorrt-cicd commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Test plan

  • Verify fix on the same GPU type as the original failure
  • Check for regressions in related tests

Links

Summary by CodeRabbit

  • Tests
    • Optimized GPU memory allocation for improved test stability in specific execution scenarios
    • Re-enabled a previously skipped test case to enhance validation coverage

@tensorrt-cicd
tensorrt-cicd requested a review from a team as a code owner June 8, 2026 09:33
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

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: 69f31610-945b-48a4-b084-4a8ee27d5444

📥 Commits

Reviewing files that changed from the base of the PR and between 2febb37 and 5a514e8.

📒 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 the Qwen 3 30B A3B Instruct test configuration to prevent out-of-memory during fp8 precision test execution when torch_compile is enabled. The KV-cache memory fraction is conditionally reduced from default to 0.6 to provide workspace for CUDA-graph capture, and the corresponding test waiver is removed since the configuration change allows the test to pass.

Changes

KV-cache memory adjustment for torch_compile

Layer / File(s) Summary
KV-cache memory fraction reduction and waiver removal
tests/integration/defs/accuracy/test_llm_api_pytorch.py, tests/integration/test_lists/waives.txt
test_fp8 for TestQwen3_30B_A3B_Instruct_2507 now conditionally overrides pytorch_config["kv_cache_config"] with free_gpu_memory_fraction=0.6 when torch_compile is enabled. The corresponding waiver for this test case is removed from the skip list since the fix resolves the executor OOM issue.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • NVIDIA/TensorRT-LLM#13852: Introduces the KvCacheConfig(free_gpu_memory_fraction=0.6) pattern to avoid KV-cache OOM, directly matching this PR's fix approach.
  • NVIDIA/TensorRT-LLM#14948: Also removes a previously waived test_fp8 case from tests/integration/test_lists/waives.txt, demonstrating a similar pattern of test waiver cleanup.
  • NVIDIA/TensorRT-LLM#15077: Modifies tests/integration/test_lists/waives.txt to update the test-skip configuration, operating on the same waiver list as this PR.

Suggested reviewers

  • Wanli-Jiang
  • moraxu
  • jieli-matrix
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: conditionally lowering KV-cache free_gpu_memory_fraction when torch_compile is enabled to resolve OOM issues.
Description check ✅ Passed The PR description provides clear root cause analysis, the specific fix applied, references to related prior work, and documents the test verification performed.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

@byshiue

byshiue commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #52898 [ run ] triggered by Bot. Commit: 5a514e8 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #52898 [ run ] completed with state SUCCESS. Commit: 5a514e8
/LLM/main/L0_MergeRequest_PR pipeline #42147 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

@byshiue

byshiue commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53419 [ run ] triggered by Bot. Commit: 5a514e8 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53419 [ run ] completed with state FAILURE. Commit: 5a514e8
/LLM/main/L0_MergeRequest_PR pipeline #42590 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

@byshiue

byshiue commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53734 [ run ] triggered by Bot. Commit: 5a514e8 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #53734 [ run ] completed with state ABORTED. Commit: 5a514e8

Link to invocation

@byshiue

byshiue commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #54226 [ run ] triggered by Bot. Commit: 5a514e8 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #54226 [ run ] completed with state FAILURE. Commit: 5a514e8
/LLM/main/L0_MergeRequest_PR pipeline #43303 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

…fp8 with torch_compile

Piecewise CUDA-graph capture under torch_compile=True needs additional GPU
workspace beyond what the default kv_cache fraction (0.9) reserves on the
44 GiB L40S. As a result, _capture_piecewise_cuda_graphs OOMs in the
executor_extra stage during executor creation.

Mirror the established fix from NVIDIA#14109 (nvbugs/6162860, TestDeepSeekV3Lite):
when torch_compile=True, set free_gpu_memory_fraction=0.6 so the executor
has room for graph workspace. The non-compile path keeps the default and
already passes.

Also remove the now-obsolete L40S waiver for this test.

Signed-off-by: tensorrt-cicd <90828364+tensorrt-cicd@users.noreply.github.com>
@tensorrt-cicd
tensorrt-cicd force-pushed the repair-bot-bug6276841 branch from 5a514e8 to 2e936b6 Compare June 17, 2026 06:36
Signed-off-by: bhsueh <11360707+byshiue@users.noreply.github.com>

# Conflicts:
#	tests/integration/defs/accuracy/test_llm_api_pytorch.py
#	tests/integration/test_lists/waives.txt
@byshiue

byshiue commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #55938 [ run ] triggered by Bot. Commit: 6025ae9 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #55938 [ run ] completed with state FAILURE. Commit: 6025ae9
/LLM/main/L0_MergeRequest_PR pipeline #44821 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

@byshiue

byshiue commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #56018 [ run ] triggered by Bot. Commit: 6025ae9 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #56018 [ run ] completed with state FAILURE. Commit: 6025ae9
/LLM/main/L0_MergeRequest_PR pipeline #44895 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

@byshiue

byshiue commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #56246 [ run ] triggered by Bot. Commit: 6025ae9 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #56246 [ run ] completed with state FAILURE. Commit: 6025ae9
/LLM/main/L0_MergeRequest_PR pipeline #45106 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

@byshiue

byshiue commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

/bot run

1 similar comment
@byshiue

byshiue commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #56773 [ run ] triggered by Bot. Commit: 6025ae9 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #56773 [ run ] completed with state FAILURE. Commit: 6025ae9
/LLM/main/L0_MergeRequest_PR pipeline #45595 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

@byshiue
byshiue requested review from a team as code owners July 17, 2026 02:10
@byshiue

byshiue commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

/bot run --disable-cbts

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #59832 [ run ] triggered by Bot. Commit: bb79ca7 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #59832 [ run ] completed with state FAILURE. Commit: bb79ca7
/LLM/main/L0_MergeRequest_PR pipeline #48240 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

@byshiue

byshiue commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

/bot run --disable-cbts

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #60206 [ run ] triggered by Bot. Commit: bb79ca7 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #60206 [ run ] completed with state FAILURE. Commit: bb79ca7
/LLM/main/L0_MergeRequest_PR pipeline #48581 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

Signed-off-by: bhsueh <11360707+byshiue@users.noreply.github.com>

# Conflicts:
#	tests/integration/test_lists/waives.txt
@byshiue

byshiue commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

/bot run --disable-cbts

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #60523 [ run ] triggered by Bot. Commit: bdecb96 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator Author

PR_Github #60523 [ run ] completed with state FAILURE. Commit: bdecb96
/LLM/main/L0_MergeRequest_PR pipeline #48847 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

# 44 GiB L40S; lower the fraction in that case to avoid executor OOM.
if torch_compile:
pytorch_config["kv_cache_config"] = KvCacheConfig(
free_gpu_memory_fraction=0.6)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this may affect perf value for other models

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.

5 participants