Skip to content

[None][test] add e2e key model perf test - #17047

Merged
ruodil merged 6 commits into
NVIDIA:mainfrom
ruodil:user/ruodil/perf-core-key-model-coverage
Aug 3, 2026
Merged

[None][test] add e2e key model perf test#17047
ruodil merged 6 commits into
NVIDIA:mainfrom
ruodil:user/ruodil/perf-core-key-model-coverage

Conversation

@ruodil

@ruodil ruodil commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Dev Engineer Review

  • Added DeepSeek-V4 NVTX annotations for gate, MoE, and mHC entry points.
  • Added model paths, PyTorch performance configuration rules, remote-code allowlisting, and llm_perf_core coverage for DeepSeek-V4-Pro, GLM-5.2, MiniMax-M3, and Gemma-4.
  • Configurations cover supported GPU architectures, backends, sequence lengths, throughput/latency modes, KV-cache settings, CUDA graph schedules, and speculative decoding.
  • No obvious API or scope regressions identified; git diff --check passes.

QA Engineer Review

  • Modified tests/integration/test_lists/qa/llm_perf_core.yml.
  • Added QA entries for DeepSeek-V4-Pro, GLM-5.2, MiniMax-M3 variants, and Gemma-4 variants, including throughput and latency scenarios.
  • No test functions were added or modified.
  • Verdict: needs follow-up pending CBTS coverage data.

Description

Test Coverage

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • 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.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds NVTX markers for DeepSeek V4 and mHC, and expands performance benchmark configuration and test coverage for new GLM, MiniMax, Gemma, and DeepSeek model variants.

Changes

NVTX instrumentation

Layer / File(s) Summary
DeepSeek V4 and mHC marking
tensorrt_llm/tools/layer_wise_benchmarks/mark_utils.py
Adds NVTX annotations for DeepSeek V4 gate and MoE forwards, plus the mHC mapping methods pre_mapping, fused_hc, and post_mapping.

Performance model coverage

Layer / File(s) Summary
Model registry and benchmark configuration
tests/integration/defs/perf/_model_paths.py, tests/integration/defs/perf/pytorch_model_config.py, tests/integration/defs/perf/test_perf.py
Registers new model paths, model-specific benchmark settings, and MiniMax remote-code handling.
GPU performance test matrix
tests/integration/test_lists/qa/llm_perf_core.yml
Adds GPU performance cases for DeepSeek V4, GLM-5.2, MiniMax-M3, and Gemma 4 variants.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: chzblych, yufeiwu-nv

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description keeps the template but leaves the Description and Test Coverage sections empty. Fill in the Description and Test Coverage sections with a short what/why summary and the tests that cover these changes.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title is related to the added performance test coverage, though it is a bit vague.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
tests/integration/test_lists/qa/llm_perf_core.yml (1)

203-319: 📐 Maintainability & Code Quality | 🔵 Trivial

Test coverage summary: needs follow-up.

No test functions were added, modified, or removed. The new DeepSeek V4, GLM-5.2, MiniMax-M3, and Gemma 4 parameterized cases are listed in this QA file and exercise the corresponding model paths and configuration patterns. No test-db/ mirror is required; QA lists are maintained independently. Hardware gating and the M3 token-cap discrepancy still require confirmation.

As per path instructions, QA-list coverage is independent of CI test-db coverage.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/integration/test_lists/qa/llm_perf_core.yml` around lines 203 - 319,
Follow up on the QA-list additions for DeepSeek V4, GLM-5.2, MiniMax-M3, and
Gemma 4 by confirming their hardware gating and configuration validity,
especially the MiniMax-M3 ISL+OSL token cap versus max_seq_len requirement. Keep
coverage represented through the existing perf/test_perf.py parameterized
entries; do not add test functions or a test-db mirror.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/integration/test_lists/qa/llm_perf_core.yml`:
- Around line 314-315: Align the MiniMax-M3 test cases in the perf workload
definitions with the documented 2048-token cap: update the input/output lengths
for both `2000,500` and `500,2000` cases so their totals do not exceed 2048, or
update and validate the corresponding safety-envelope configuration before
retaining them.

---

Nitpick comments:
In `@tests/integration/test_lists/qa/llm_perf_core.yml`:
- Around line 203-319: Follow up on the QA-list additions for DeepSeek V4,
GLM-5.2, MiniMax-M3, and Gemma 4 by confirming their hardware gating and
configuration validity, especially the MiniMax-M3 ISL+OSL token cap versus
max_seq_len requirement. Keep coverage represented through the existing
perf/test_perf.py parameterized entries; do not add test functions or a test-db
mirror.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4e3762f4-2f75-4ebe-9b3f-b8de70fb9d1b

📥 Commits

Reviewing files that changed from the base of the PR and between 78ab4e7 and abefef3.

📒 Files selected for processing (5)
  • tensorrt_llm/tools/layer_wise_benchmarks/mark_utils.py
  • tests/integration/defs/perf/_model_paths.py
  • tests/integration/defs/perf/pytorch_model_config.py
  • tests/integration/defs/perf/test_perf.py
  • tests/integration/test_lists/qa/llm_perf_core.yml

Comment thread tests/integration/test_lists/qa/llm_perf_core.yml
… MiniMax-M3 and Gemma-4

Four models that TensorRT LLM already supports had no coverage, or only
partial coverage, in the QA perf core list:

* DeepSeek-V4-Pro: only the DSpark speculative-decoding variant was listed,
  so the plain Pro checkpoint was untracked. Adds throughput and latency
  cases with the knobs from
  examples/configs/curated/deepseek-v4-pro-{throughput,latency}.yaml, at the
  8K/1K fixed shape used for DeepSeek-V4 Pro in tech blog 26.
* GLM-5.2: only glm_5_fp8 was listed. Adds the NVFP4 checkpoint with the
  CuteDSL MoE backend used by TestGLM52::test_nvfp4, mirroring the glm_5_fp8
  ISL/OSL sweep so the two are directly comparable. Speculative decoding is
  intentionally left off so the sweep measures kernel time rather than MTP
  acceptance rate.
* MiniMax-M3: the MXFP8 checkpoint is already covered at 4 GPUs. Adds the
  NVFP4 checkpoint (MXFP8 base layers with NVFP4 routed experts on CUTLASS)
  on the MSA sparse-attention path, at 4 GPUs and at the 8-GPU TP8/EP8 scale
  from
  docs/source/deployment-guide/deployment-guide-for-minimax-m3-on-trtllm.md.
  The MSA kernels are SM100/SM103 only, so the cases are restricted to
  B200/GB200/B300/GB300. The pattern is scoped to the NVFP4 label so the
  existing MXFP8 configuration is unchanged. ISL+OSL is kept at or below
  2048 because the sparse path requires max_seq_len capped just above it,
  otherwise CUDA-graph capture fails on gigabyte-scale warmup temporaries.
* Gemma-4: no perf coverage at all. Adds the NVFP4 MoE (26B-A4B) and dense
  (31B) checkpoints on a single GPU, reusing the existing
  gemma_4_26b_a4b_nvfp4 path entry and registering the 31B one alongside it.
  The FLASHINFER backend is selected by the model's own get_model_defaults(),
  so it is not repeated in the perf config. An 8000-token ISL is included to
  exercise the 1024-token sliding window. Coverage is limited to Blackwell
  because the model dispatches trtllm-gen cubins for all layers.

Newer versions of these model families are not covered because the
repository currently supports Kimi K2.5, Qwen3.5 and Nemotron 3.

Signed-off-by: Ruodi Lu <ruodil@users.noreply.github.com>
@ruodil
ruodil force-pushed the user/ruodil/perf-core-key-model-coverage branch from abefef3 to 5a2dc86 Compare July 30, 2026 08:01

@fredricz-20070104 fredricz-20070104 left a comment

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.

Review summary - Approve

Reviewed the full diff; no blocking or major issues found.

Minor, non-blocking notes:

  • tests/integration/defs/perf/pytorch_model_config.py: MiniMax-M3 comment claims ISL+OSL <= 2048 but real cases reach 2500
  • tests/integration/defs/perf/pytorch_model_config.py: Very broad 'gemma_4_' pattern

Automated review by NVCortex Lite, run by @fredricz-20070104.

@BowenFu

BowenFu commented Jul 30, 2026

Copy link
Copy Markdown

Reviewed. The thing I check hardest on a pytorch_model_config.py change is whether a new block silently captures an already-scheduled test — matching is substring, not equality (pytorch_model_config.py:624-625), and the perf lists store non-canonical labels that PerfTestConfig.to_string() rewrites before matching, so a literal grep proves nothing. A recent PR in this file did exactly that.

This one is clean. I resolved both versions of get_model_yaml_config over every scheduled label under tests/integration/test_lists/, canonicalized through to_string(), and diffed the resulting config dicts: zero pre-existing tests change. None of deepseek_v4_pro_fp4, glm_5.2_fp4, gemma_4_, or minimax_m3_fp4 captures anything already scheduled, the _model_paths.py additions are exact new keys with no overwrite, the new cases are QA-only (llm_perf_core.yml, nothing in test-db/**), and the test_perf.py change is just adding minimax_m3_fp4 to TRUST_REMOTE_CODE_MODELS.

On the open CodeRabbit thread about the M3 token cap — it's a comment bug, not a functional one, so please just fix the comments rather than the cases. input_output_len:2000,500 and 500,2000 are 2500 tokens and the block sets max_seq_len: 2560, so they fit; the sparse-attention sizing keys off max_seq_len, not a hard 2048. But the config comment says "Every NVFP4 case keeps ISL+OSL <= 2048" and llm_perf_core.yml:255 repeats it, and both are now false. Since that comment is the only record of why max_seq_len is pinned just above ISL+OSL, leaving it wrong is how the next person picks the wrong headroom.

Holding my approval only on that one open thread; the substance looks right to me.

@BowenFu BowenFu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approving over the one open CodeRabbit thread: the 2048 issue is a stale comment, not a functional one (M3 cases are 2500 tokens and the block pins max_seq_len: 2560, and sizing keys off max_seq_len) — see issuecomment-5133921492. Still worth fixing the <= 2048 comments in the config block and llm_perf_core.yml:255, non-blocking. Verified no pre-existing scheduled test changes config: resolve-and-diff over every scheduled label returned zero deltas, and the new cases are QA-list only (nothing under test-db/**).

Signed-off-by: ruodil <200874449+ruodil@users.noreply.github.com>
@ruodil
ruodil enabled auto-merge (squash) August 3, 2026 02:36
@ruodil

ruodil commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

/bot skip --comment "skip CI as just adding test cases"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63340 [ skip ] triggered by Bot. Commit: cc3e851 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63340 [ skip ] completed with state SUCCESS. Commit: cc3e851
Skipping testing for commit cc3e851

Link to invocation

@ruodil

ruodil commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

/bot skip --comment "skip CI as just adding test cases"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63407 [ skip ] triggered by Bot. Commit: 7f0d3a4 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63407 [ skip ] completed with state SUCCESS. Commit: 7f0d3a4
Skipping testing for commit 7f0d3a4

Link to invocation

@ruodil
ruodil merged commit 9cc292c into NVIDIA:main Aug 3, 2026
7 checks passed
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