Skip to content

[None][test] Guard benchmark CUDA graph configuration - #21234

Open
ruodil wants to merge 2 commits into
NVIDIA:mainfrom
ruodil:user/ruodil/test-module-benchmark-config
Open

ruodil wants to merge 2 commits into
NVIDIA:mainfrom
ruodil:user/ruodil/test-module-benchmark-config

Conversation

@ruodil

@ruodil ruodil commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Guard CUDA graph defaults against the effective runtime capacity, preserve explicit graph settings and YAML/CLI precedence, and ensure repeated calls do not mutate reusable performance options.

Split the benchmark module coverage out of #21095 so it can be reviewed independently. This PR contains only its tests and any associated CI-list changes.

The production prerequisite #21095 merged into main as ff1aa0f7d35c on 2026-11-03. This test-only PR now includes that fix through a normal merge of main (fee6cfd872bc) and has passed current-head L0 CI; Code Owner review remains required.

Test Coverage

  • The preserved module coverage passed in a fresh run of the original PR snapshot: 52 CPU, zero failures/errors/skips. The complete original snapshot passed 443 CPU + 9 GPU cases on RTX PRO 6000 Blackwell; this is not a runtime result for the rebased PR head.
  • Current merged head d79becdba482: all applicable pre-commit hooks passed, including Ruff, formatting, generated-config checks and repository-wide test-list validation; git diff --check passed. Independent review found no current API mismatch. The effective diff remains 140 test lines, covering 38 added parametrized cases in seven test functions.
  • Current-head remote validation (d79becdba482): L0 pipeline #67851 completed SUCCESS. This supersedes the earlier local collection limitation caused by the host lacking libcuda.so.1. Required GitHub checks are passing; Code Owner approval is still required.
  • The seven split patches were checked for complete coverage of the original 22-file diff and exact recombination after the required upstream API compatibility changes.

PR Checklist

  • Reviewed the applicable repository PR checklist items; the commit includes a DCO sign-off.

Dev Engineer Review

  • The change adds benchmark runtime configuration tests. It does not change production code or public APIs.
  • The tests check CUDA graph defaults against effective batch capacity. They also check explicit capture settings, None and zero handling, YAML/CLI precedence, and repeated calls that must not mutate reusable performance options.
  • The inspected test is marked cpu_only. No runtime test result for the current head is available here.

QA Engineer Review

  • The change adds seven test functions in tests/unittest/others/test_bench.py, with 38 parametrized cases.
  • Coverage includes capacity values, missing and partial graph options, explicit capture domains, disabled capture, the zero sentinel, repeated calls, and YAML/CLI precedence.
  • No changed test-list file is visible in the inspected worktree. The matching test-db search found only an existing entry for unittest/llmapi/test_bench_async.py; listing of this new unit test is not established.
  • Coverage verdict: sufficient for the stated CUDA graph configuration behaviors. Current-head runtime execution remains unverified.

Per-File QA Perspective

  • tests/unittest/others/test_bench.py: Adds CPU-only tests for benchmark runtime CUDA graph defaults, explicit graph settings, and configuration precedence. The inspected test-db list does not show this file; its listing status is not established.

Signed-off-by: Ruodi Lu <ruodil@users.noreply.github.com>
Signed-off-by: Ruodi Lu <ruodil@users.noreply.github.com>
@ruodil
ruodil marked this pull request as ready for review November 3, 2026 06:21
@ruodil

ruodil commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@ruodil
ruodil requested a review from a team as a code owner November 3, 2026 06:21
@ruodil
ruodil requested review from QiJune and schetlur-nv November 3, 2026 06:21
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #82224 [ run ] triggered by Bot. Commit: d79becd Link to invocation

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

The change adds unit tests for CUDA graph defaults and option precedence. The tests cover runtime capacities, explicit graph settings, disabled capture, repeated calls, and YAML versus CLI options.

Changes

CUDA Graph Configuration Tests

Layer / File(s) Summary
Graph defaults and option precedence
tests/unittest/others/test_bench.py
Tests cover capacity-based defaults, explicit graph settings, disabled capture, unchanged reusable options across calls, and YAML/CLI precedence for capacity and graph options.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: Minimal · up to d79be

No merge-blocking regression was established. Current-head CI results remain pending.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title follows the required [ticket][type] format and clearly describes the added benchmark CUDA graph configuration tests.
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.
Description check Passed The description includes the required Description and Test Coverage sections and explains the purpose, scope, test cases, CI results, limitations, and checklist review. The PR title and individual che…
Full details: Description check

Explanation

The description includes the required Description and Test Coverage sections and explains the purpose, scope, test cases, CI results, limitations, and checklist review. The PR title and individual checklist items are not provided in the supplied description, but the description is otherwise complete and relevant.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 5 functions across 1 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ast-grep (0.51.1)

ast-grep could not parse rule config: /ast-grep-rules/ast-grep-essentials/rules/go/security/template-html-unescaped-template-html-go.yml

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between fee6cfd and d79becd.

Files selected for processing: 1
  • tests/unittest/others/test_bench.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #82224 [ run ] completed with state SUCCESS. Commit: d79becd
/LLM/main/L0_MergeRequest_PR pipeline #67851 completed with status: 'SUCCESS'

CI Report

Link to invocation

This branch has not been deployed

No deployments
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.

2 participants