KEMBAR78
[None][chore] Fix kernel launch param and add TRTLLM MoE backend test by pengbowang-nv · Pull Request #7524 · NVIDIA/TensorRT-LLM · GitHub
Skip to content

Conversation

@pengbowang-nv
Copy link
Collaborator

@pengbowang-nv pengbowang-nv commented Sep 4, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Improved stability for large-generation workloads by capping GPU kernel launch sizes, reducing risk of failures on extreme token counts.
  • Tests

    • Expanded PyTorch LLM accuracy tests to cover multiple MoE backends (including TRT-LLM) and FP8/NVFP4 block-scale paths.
    • Added new throughput_mtp_trtllm variants to DGX B200 and GB200 multi-node test suites.
    • Increased multi-node SBSA test splits to improve coverage and parallelism.

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)

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • 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

/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...

Provide a user friendly way for developers to interact with a Jenkins server.

Run /bot [-h|--help] to print this help message.

See details below for each supported subcommand.

run [--reuse-test (optional)pipeline-id --disable-fail-fast --skip-test --stage-list "A10-PyTorch-1, xxx" --gpu-type "A30, H100_PCIe" --test-backend "pytorch, cpp" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" --detailed-log --debug(experimental)]

Launch build/test pipelines. All previously running jobs will be killed.

--reuse-test (optional)pipeline-id (OPTIONAL) : Allow the new pipeline to reuse build artifacts and skip successful test stages from a specified pipeline or the last pipeline if no pipeline-id is indicated. If the Git commit ID has changed, this option will be always ignored. The DEFAULT behavior of the bot is to reuse build artifacts and successful test results from the last pipeline.

--disable-reuse-test (OPTIONAL) : Explicitly prevent the pipeline from reusing build artifacts and skipping successful test stages from a previous pipeline. Ensure that all builds and tests are run regardless of previous successes.

--disable-fail-fast (OPTIONAL) : Disable fail fast on build/tests/infra failures.

--skip-test (OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.

--stage-list "A10-PyTorch-1, xxx" (OPTIONAL) : Only run the specified test stages. Examples: "A10-PyTorch-1, xxx". Note: Does NOT update GitHub check status.

--gpu-type "A30, H100_PCIe" (OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.

--test-backend "pytorch, cpp" (OPTIONAL) : Skip test stages which don't match the specified backends. Only support [pytorch, cpp, tensorrt, triton]. Examples: "pytorch, cpp" (does not run test stages with tensorrt or triton backend). Note: Does NOT update GitHub pipeline status.

--only-multi-gpu-test (OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.

--disable-multi-gpu-test (OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.

--add-multi-gpu-test (OPTIONAL) : Force run the multi-GPU tests in addition to running L0 pre-merge pipeline.

--post-merge (OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.

--extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" (OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx".

--detailed-log (OPTIONAL) : Enable flushing out all logs to the Jenkins console. This will significantly increase the log volume and may slow down the job.

--debug (OPTIONAL) : Experimental feature. Enable access to the CI container for debugging purpose. Note: Specify exactly one stage in the stage-list parameter to access the appropriate container environment. Note: Does NOT update GitHub check status.

For guidance on mapping tests to stage names, see docs/source/reference/ci-overview.md
and the scripts/test_to_stage_mapping.py helper.

kill

kill

Kill all running builds associated with pull request.

skip

skip --comment COMMENT

Skip testing for latest commit on pull request. --comment "Reason for skipping build/test" is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

reuse-pipeline

reuse-pipeline

Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

@pengbowang-nv
Copy link
Collaborator Author

/bot run --stage-list "DGX_B200-8_GPUs-PyTorch-1"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #17649 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #17649 [ run ] completed with state SUCCESS
/LLM/release-1.1.0rc2/L0_MergeRequest_PR pipeline #63 (Partly Tested) completed with status: 'FAILURE'

@pengbowang-nv pengbowang-nv force-pushed the dev-change-moe-backend-to-trtllm branch from c845f27 to d756fe6 Compare September 8, 2025 08:24
@pengbowang-nv pengbowang-nv changed the title [None][chore] Change moe backend in DeepSeek-R1 fp8 test to TRTLLM [None][chore] Fix kernel launch param and add TRTLLM MoE backend test Sep 8, 2025
@pengbowang-nv
Copy link
Collaborator Author

/bot run --add-multi-gpu-test

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18013 [ run ] triggered by Bot

@pengbowang-nv pengbowang-nv force-pushed the dev-change-moe-backend-to-trtllm branch from d756fe6 to c1c53b6 Compare September 8, 2025 09:35
@pengbowang-nv
Copy link
Collaborator Author

/bot run --add-multi-gpu-test

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18027 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18013 [ run ] completed with state ABORTED

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18027 [ run ] completed with state SUCCESS
/LLM/release-1.1.0rc2/L0_MergeRequest_PR pipeline #96 completed with status: 'FAILURE'

max_batch_size):
if get_sm_version() == 100:
moe_config = MoeConfig(backend="DEEPGEMM", max_num_tokens=16384)
moe_config = MoeConfig(backend="TRTLLM", max_num_tokens=16384)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@pengbowang-nv , I think we have to keep "DEEPGEMM" backend test, and add TRTLLM, not replacement.

@litaotju litaotju added the Release Blocker PRs that blocking the final release build or branching out the release branch label Sep 9, 2025
Signed-off-by: Pengbo Wang <221450789+pengbowang-nv@users.noreply.github.com>
Signed-off-by: Pengbo Wang <221450789+pengbowang-nv@users.noreply.github.com>
Signed-off-by: Pengbo Wang <221450789+pengbowang-nv@users.noreply.github.com>
@pengbowang-nv pengbowang-nv force-pushed the dev-change-moe-backend-to-trtllm branch from c1c53b6 to 5f53fdb Compare September 9, 2025 03:52
@pengbowang-nv
Copy link
Collaborator Author

/bot run --add-multi-gpu-test

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18148 [ run ] triggered by Bot

@pengbowang-nv
Copy link
Collaborator Author

/bot run --add-multi-gpu-test

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18148 [ run ] completed with state SUCCESS
/LLM/release-1.1.0rc2/L0_MergeRequest_PR pipeline #109 completed with status: 'FAILURE'

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18177 [ run ] triggered by Bot

@pengbowang-nv
Copy link
Collaborator Author

/bot run --add-multi-gpu-test --disable-fail-fast

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18177 [ run ] completed with state SUCCESS
/LLM/release-1.1.0rc2/L0_MergeRequest_PR pipeline #110 completed with status: 'FAILURE'

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18200 [ run ] triggered by Bot

@pengbowang-nv
Copy link
Collaborator Author

/bot run --add-multi-gpu-test --disable-fail-fast

@pengbowang-nv pengbowang-nv marked this pull request as ready for review September 9, 2025 13:13
@pengbowang-nv pengbowang-nv requested a review from a team as a code owner September 9, 2025 13:13
@pengbowang-nv pengbowang-nv requested a review from a team as a code owner September 9, 2025 13:13
@tensorrt-cicd
Copy link
Collaborator

PR_Github #18228 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #18200 [ run ] completed with state ABORTED

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 9, 2025

📝 Walkthrough

Walkthrough

Caps CUDA kernel launch grid dimensions at 8192 in DevKernel.cu; updates Jenkins GB200 multi-node test splits from 4 to 5 and adds a PyTorch-5 entry; extends PyTorch integration tests to parameterize/select MoE backends; adds new fp8_blockscale throughput_mtp_trtllm test entries to DGX B200 and GB200 multi-node test lists.

Changes

Cohort / File(s) Summary
CUDA kernel launch cap
cpp/tensorrt_llm/kernels/trtllmGenKernels/blockScaleMoe/DevKernel.cu
Replaces uses of data.numTokens in grid.z/numBlocksY with std::min(8192, data.numTokens) across activation, permute, and finalize paths; finalize path selection threshold indirectly affected; no kernel signature changes.
Jenkins GB200 multi-node splits
jenkins/L0_Test.groovy
For GB200-8_GPUs-2_Nodes SBSA tests, changes PyTorch splits from 4→5 and adds a PyTorch-5 entry; mirrors same change in post-merge SBSA.
PyTorch integration tests: MoE backend param
tests/integration/defs/accuracy/test_llm_api_pytorch.py
Adds moe_backend parameter to several tests; maps _DEFAULT to DEEPGEMM on SM=100; skips when incompatible; passes MoeConfig(backend=...) to tests involving NVFP4/FP8 block scales/MoE.
Test DB additions (DGX B200, GB200 multi-node)
tests/integration/test_lists/test-db/l0_dgx_b200.yml, tests/integration/test_lists/test-db/l0_gb200_multi_nodes.yml
Adds new entry: accuracy/test_llm_api_pytorch.py::TestDeepSeekR1::test_fp8_blockscale[throughput_mtp_trtllm] TIMEOUT (180) to relevant 4-GPU and 8-GPU pre-merge lists; post-merge unchanged except where noted.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant T as Test Runner
  participant P as Parametrize (moe_backend)
  participant D as Device Query (SM)
  participant C as Config (MoeConfig)
  participant S as Skipper

  T->>P: Get moe_backend param
  P->>D: Query SM version
  alt _DEFAULT
    D-->>P: SM value
    P->>C: backend = DEEPGEMM if SM==100 else default path
    C-->>T: MoeConfig(backend=resolved)
    T->>T: Run test with config
  else Explicit backend (e.g., TRTLLM)
    D-->>P: SM value
    alt Supported (e.g., SM==100)
      P->>C: backend = requested
      C-->>T: MoeConfig(backend=requested)
      T->>T: Run test with config
    else Unsupported
      P->>S: Mark test as skipped
      S-->>T: Skip
    end
  end
Loading
sequenceDiagram
  autonumber
  participant L as Launcher
  participant K as Kernels
  participant M as Metrics

  L->>L: tokens = data.numTokens
  L->>L: capped = min(8192, tokens)
  L->>K: Launch activation kernels with grid.z=capped
  L->>K: Launch permute/finalize with numBlocksY=capped
  alt Finalize path selection
    L->>L: Evaluate threshold using capped
    L->>K: finalizeKernel or finalizeKernelVecLoad
  end
  K-->>M: Execution metrics (unchanged compute)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks (1 passed, 2 warnings)

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description remains populated only with the template placeholders and comments without any actual content describing the change or its test coverage, making it impossible for reviewers to understand what was implemented or how it is validated. Please remove the placeholder comments and fill in the Summary, Description, and Test Coverage sections with a concise overview of the changes (fixing kernel launch parameters, adding TRTLLM MoE backend tests) and list the specific tests that cover these paths.
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title accurately and concisely summarizes the two primary changes in this PR: capping the kernel launch parameters and adding tests for the TRTLLM MoE backend, providing clear context for reviewers.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tests/integration/test_lists/test-db/l0_gb200_multi_nodes.yml (1)

3-15: Correct system_gpu_count for l0_gb200_multi_nodes.yml
In tests/integration/test_lists/test-db/l0_gb200_multi_nodes.yml, system_gpu_count is sourced from each node’s local GPU count (see get_sysinfo.py: system_gpu_count = num_gpus), so it should be 4, not 8.

-      system_gpu_count:
-        gte: 8
-        lte: 8
+      system_gpu_count:
+        gte: 4
+        lte: 4
🧹 Nitpick comments (3)
cpp/tensorrt_llm/kernels/trtllmGenKernels/blockScaleMoe/DevKernel.cu (2)

189-197: Use a named constant and ensure std::min is available

  • Define a single kMAX_GRID_DIM_YZ and use std::min(...) to avoid type surprises.
  • Add include explicitly to prevent relying on transitive headers.

Apply diff within these ranges:

-const dim3 grid(data.innerDim / 128, data.topK, std::min(8192, data.numTokens));
+const dim3 grid(data.innerDim / 128, data.topK, std::min<int>(kMAX_GRID_DIM_YZ, data.numTokens));
-int const numBlocksY = std::min(8192, data.numTokens);
+int const numBlocksY = std::min<int>(kMAX_GRID_DIM_YZ, data.numTokens);

Additional changes outside the selected ranges (supporting code):

// At file top near other includes
#include <algorithm>

// Near other module-level constants
constexpr int kMAX_GRID_DIM_YZ = 8192;

Also applies to: 374-375, 460-461


701-719: Vectorized finalize selection may be skewed by capped Y

The decision uses numBlocksY capped at 8192, which can under-estimate waves for very large token counts and pick the non-vectorized path. If the intent is to decide by total work, compute the threshold with data.numTokens (uncapped), but keep the launch cap.

-        int const numBlocksY = std::min(8192, data.numTokens);
+        int const numBlocksY = std::min<int>(kMAX_GRID_DIM_YZ, data.numTokens);
         if (numBlocksX * numBlocksY < 1184)
+        // Consider: if (static_cast<long long>(numBlocksX) * static_cast<long long>(data.numTokens) < 1184)
         {

If you want, I can draft a quick micro-benchmark harness to compare both choices on SM100/SM120.

tests/integration/test_lists/test-db/l0_gb200_multi_nodes.yml (1)

16-21: Confirm 180-minute TIMEOUT is intentional and necessary (minutes, not seconds).
If the P95 runtime for these DeepSeek R1 throughput tests consistently falls well below 120 minutes, consider lowering the TIMEOUT to 120 minutes to reduce CI queue pressure.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d60dad6 and 5f53fdb.

📒 Files selected for processing (5)
  • cpp/tensorrt_llm/kernels/trtllmGenKernels/blockScaleMoe/DevKernel.cu (3 hunks)
  • jenkins/L0_Test.groovy (1 hunks)
  • tests/integration/defs/accuracy/test_llm_api_pytorch.py (1 hunks)
  • tests/integration/test_lists/test-db/l0_dgx_b200.yml (1 hunks)
  • tests/integration/test_lists/test-db/l0_gb200_multi_nodes.yml (1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{h,hpp,hh,hxx,cpp,cxx,cc,cu,cuh}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

**/*.{h,hpp,hh,hxx,cpp,cxx,cc,cu,cuh}: Namespace closing braces must include a trailing comment with the namespace name (e.g., '} // namespace foo').
Prefer const or constexpr variables over #define for constants.
Declare variables that are not modified after initialization as const.
Avoid magic literals in code; except for 0, nullptr, true, false. Use named constants for comparisons and logic.
Use Allman brace style for formatting.
Place the semicolon of an empty for/while loop on a new line.
Bodies of switch/while/do-while/for must be compound statements (brace-delimited), and if/else must always be followed by brace-delimited statements.
Type names (e.g., classes) must be CamelCase starting with an uppercase letter (e.g., FooBar).
Local variables, methods, and namespaces use lowerCamelCase (e.g., localFooBar).
Non-magic-number global variables that are non-static and not in an anonymous namespace must be lowerCamelCase prefixed with 'g' (e.g., gDontUseGlobalFoos).
Non-magic-number globals that are static or in an anonymous namespace use lowerCamelCase prefixed with 's' (e.g., sMutableStaticGlobal).
Locally visible static variables use lowerCamelCase with 's' prefix (e.g., static std::once_flag sFlag).
Private/protected member variables use 'm' prefix with CamelCase (e.g., mNbFooValues). Public members may omit, but 'm' is encouraged for clarity.
Constants (enums, global constants, static constants, and function-scope magic/literal constants) use uppercase SNAKE_CASE with 'k' prefix (e.g., kDIGIT_NUM).
Function-scope constants that are not magic numbers or literals are named like non-constant variables (e.g., bool const pass = a && b).
If macros are necessary, name them in UPPER_SNAKE_CASE (e.g., FOO_VERSION) and prefer constants over #define.
Use LLVM clang-format; wrap lines at a maximum of 120 columns; use '// clang-format off/on' sparingly with justification.
Use smart pointers for heap allocations; prefer unique_ptr for sole ownership, shared_ptr for shared...

Files:

  • cpp/tensorrt_llm/kernels/trtllmGenKernels/blockScaleMoe/DevKernel.cu
**/*.{cpp,cxx,cc,cu,h,hpp,hh,hxx,cuh}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

C++ filenames should be lowerCamelCase (first letter lowercase) and must be case-insensitive unique within a compilation target.

Files:

  • cpp/tensorrt_llm/kernels/trtllmGenKernels/blockScaleMoe/DevKernel.cu
**/*.{h,hpp,hh,hxx,cpp,cxx,cc,cu,cuh,py}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

Use only spaces, no tabs; indent with 4 spaces.

Files:

  • cpp/tensorrt_llm/kernels/trtllmGenKernels/blockScaleMoe/DevKernel.cu
  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
**/*.{cpp,cxx,cc,h,hpp,hh,hxx,cu,cuh,py}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

Prepend the NVIDIA Apache-2.0 copyright header with current year to the top of all source files (e.g., .cpp, .h, .cu, .py).

Files:

  • cpp/tensorrt_llm/kernels/trtllmGenKernels/blockScaleMoe/DevKernel.cu
  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
**/*.py

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

**/*.py: Python code must target Python 3.8+.
Indent Python code with 4 spaces; do not use tabs.
Maintain module namespace when importing; prefer 'from package.subpackage import foo' then 'foo.SomeClass()' instead of importing the class directly.
Python filenames should be snake_case (e.g., some_file.py).
Python classes use PascalCase names.
Functions and methods use snake_case names.
Local variables use snake_case; prefix 'k' for variables that start with a number (e.g., k_99th_percentile).
Global variables use upper SNAKE_CASE prefixed with 'G' (e.g., G_MY_GLOBAL).
Constants use upper SNAKE_CASE (e.g., MY_CONSTANT).
Avoid shadowing variables from an outer scope.
Initialize all externally visible members of a class in the constructor.
Prefer docstrings for interfaces that may be used outside a file; comments for in-function or file-local interfaces.
Use Google-style docstrings for classes and functions (Sphinx-parsable).
Document attributes and variables inline so they render under the class/function docstring.
Avoid reflection when a simpler, explicit approach suffices (e.g., avoid dict(**locals()) patterns).
In try/except, catch the most specific exceptions possible.
For duck-typing try/except, keep the try body minimal and use else for the main logic.

Files:

  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
🧠 Learnings (8)
📓 Common learnings
Learnt from: djns99
PR: NVIDIA/TensorRT-LLM#6915
File: cpp/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_kernels.cu:4010-4012
Timestamp: 2025-08-14T23:23:27.449Z
Learning: For MOE (Mixture of Experts) code reviews in TensorRT-LLM, avoid repeatedly suggesting finalize fusion validation checks and safety assertions. The user djns99 has indicated these suggestions are repetitive and unwanted across multiple MOE-related changes.
📚 Learning: 2025-08-13T11:07:11.772Z
Learnt from: Funatiq
PR: NVIDIA/TensorRT-LLM#6754
File: tests/integration/test_lists/test-db/l0_a30.yml:41-47
Timestamp: 2025-08-13T11:07:11.772Z
Learning: In TensorRT-LLM test configuration files like tests/integration/test_lists/test-db/l0_a30.yml, TIMEOUT values are specified in minutes, not seconds.

Applied to files:

  • tests/integration/test_lists/test-db/l0_dgx_b200.yml
  • tests/integration/test_lists/test-db/l0_gb200_multi_nodes.yml
📚 Learning: 2025-08-26T09:49:04.956Z
Learnt from: pengbowang-nv
PR: NVIDIA/TensorRT-LLM#7192
File: tests/integration/test_lists/test-db/l0_dgx_b200.yml:56-72
Timestamp: 2025-08-26T09:49:04.956Z
Learning: In TensorRT-LLM test configuration files, the test scheduling system handles wildcard matching with special rules that prevent duplicate test execution even when the same tests appear in multiple yaml files with overlapping GPU wildcards (e.g., "*b200*" and "*gb200*").

Applied to files:

  • tests/integration/test_lists/test-db/l0_dgx_b200.yml
📚 Learning: 2025-09-09T09:40:45.631Z
Learnt from: fredricz-20070104
PR: NVIDIA/TensorRT-LLM#7645
File: tests/integration/test_lists/qa/llm_function_core.txt:648-648
Timestamp: 2025-09-09T09:40:45.631Z
Learning: In TensorRT-LLM test lists, it's common and intentional for the same test to appear in multiple test list files when they serve different purposes (e.g., llm_function_core.txt for comprehensive core functionality testing and llm_function_core_sanity.txt for quick sanity checks). This duplication allows tests to be run in different testing contexts.

Applied to files:

  • tests/integration/test_lists/test-db/l0_dgx_b200.yml
  • tests/integration/test_lists/test-db/l0_gb200_multi_nodes.yml
📚 Learning: 2025-08-14T21:04:50.248Z
Learnt from: thorjohnsen
PR: NVIDIA/TensorRT-LLM#6910
File: cpp/tensorrt_llm/batch_manager/kvCacheManager.cpp:0-0
Timestamp: 2025-08-14T21:04:50.248Z
Learning: In KV cache onboarding logic during prefill in cpp/tensorrt_llm/batch_manager/kvCacheManager.cpp, when calculating which blocks fall within the attention window, use getTokensPerBlock() to advance token indices rather than block->getUniqueTokens().size(), because the calculation needs to consider the post-prefill state where blocks will be filled to capacity, not their current token count.

Applied to files:

  • cpp/tensorrt_llm/kernels/trtllmGenKernels/blockScaleMoe/DevKernel.cu
📚 Learning: 2025-08-09T20:57:04.084Z
Learnt from: sklevtsov-nvidia
PR: NVIDIA/TensorRT-LLM#3294
File: cpp/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_gemm_tma_warp_specialized_input.cu:118-127
Timestamp: 2025-08-09T20:57:04.084Z
Learning: In the CUTLASS MoE finalize fusion implementation (cpp/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_gemm_tma_warp_specialized_input.cu), when setting `fused_finalize_epilogue.stride_final_output` with shape `(hidden_size, num_output_tokens, 1)`, the `num_rows_in_final_output` should be set to `num_output_tokens` (not `hidden_size`) because of a swap+transpose operation that maps rows of the output tensor to `hidden_size` and columns to `num_output_tokens`.

Applied to files:

  • cpp/tensorrt_llm/kernels/trtllmGenKernels/blockScaleMoe/DevKernel.cu
📚 Learning: 2025-08-08T22:03:40.707Z
Learnt from: sklevtsov-nvidia
PR: NVIDIA/TensorRT-LLM#3294
File: cpp/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_kernels.cu:1198-1209
Timestamp: 2025-08-08T22:03:40.707Z
Learning: In the CUTLASS MoE kernels (cpp/tensorrt_llm/cutlass_extensions), when `layout_info.fusion` is set to `TmaWarpSpecializedGroupedGemmInput::EpilogueFusion::FINALIZE`, the `router_scales` parameter must be non-null by design. The fused finalize kernel epilogue does not perform nullptr checks and requires valid router scales to function correctly. This is an implicit contract that callers must satisfy when enabling the FINALIZE fusion mode.

Applied to files:

  • cpp/tensorrt_llm/kernels/trtllmGenKernels/blockScaleMoe/DevKernel.cu
📚 Learning: 2025-07-28T17:06:08.621Z
Learnt from: moraxu
PR: NVIDIA/TensorRT-LLM#6303
File: tests/integration/test_lists/qa/examples_test_list.txt:494-494
Timestamp: 2025-07-28T17:06:08.621Z
Learning: In TensorRT-LLM testing, it's common to have both CLI flow tests (test_cli_flow.py) and PyTorch API tests (test_llm_api_pytorch.py) for the same model. These serve different purposes: CLI flow tests validate the traditional command-line workflow, while PyTorch API tests validate the newer LLM API backend. Both are legitimate and should coexist.

Applied to files:

  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
🧬 Code graph analysis (1)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (2)
tests/integration/defs/conftest.py (1)
  • get_sm_version (1857-1860)
tensorrt_llm/llmapi/llm_args.py (2)
  • MoeConfig (168-202)
  • KvCacheConfig (967-1098)
🔇 Additional comments (4)
tests/integration/test_lists/test-db/l0_dgx_b200.yml (1)

74-74: Approve TRTLLM throughput variant entry

  • Parametrization id “throughput_mtp_trtllm” is present in TestDeepSeekR1::test_fp8_blockscale ids list.
  • TIMEOUT (180) is consistent with prior entries.
jenkins/L0_Test.groovy (1)

2096-2101: Ensure 5-way splitting yields non-empty groups
Config entries for splits 1–5 are defined. Please confirm that l0_gb200_multi_nodes returns at least five test cases so no split ends up empty.

tests/integration/defs/accuracy/test_llm_api_pytorch.py (1)

1921-1928: Param set adds TRTLLM throughput variant

The ids align with the DB entry you added (“throughput_mtp_trtllm”). Looks good.

tests/integration/test_lists/test-db/l0_gb200_multi_nodes.yml (1)

20-20: Approve TRTLLM MoE throughput-MTP test entry. Parameterized ID throughput_mtp_trtllm is defined in TestDeepSeekR1::test_fp8_blockscale within tests/integration/defs/accuracy/test_llm_api_pytorch.py, confirming the entry under pre_merge is correct.

Comment on lines 1933 to 1941
if get_sm_version() == 100:
moe_config = MoeConfig(backend="DEEPGEMM", max_num_tokens=16384)
moe_backend = "DEEPGEMM" if moe_backend == "_DEFAULT" else moe_backend
moe_config = MoeConfig(backend=moe_backend, max_num_tokens=16384)
kv_cache_config = KvCacheConfig(free_gpu_memory_fraction=0.6)
else:
if moe_backend != "_DEFAULT":
pytest.skip("Not supported MoE backend!")
moe_config = MoeConfig()
kv_cache_config = KvCacheConfig(free_gpu_memory_fraction=0.9)
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

TRTLLM backend is skipped on SM120 but is being scheduled on GB200

Current gating allows TRTLLM only for SM==100. GB200 (SM120) multi-node lists include the TRTLLM variant; this will be skipped here. If TRTLLM is intended on SM120, widen the check to >=100.

-        if get_sm_version() == 100:
+        if get_sm_version() >= 100:
             moe_backend = "DEEPGEMM" if moe_backend == "_DEFAULT" else moe_backend
             moe_config = MoeConfig(backend=moe_backend, max_num_tokens=16384)
             kv_cache_config = KvCacheConfig(free_gpu_memory_fraction=0.6)
         else:
             if moe_backend != "_DEFAULT":
-                pytest.skip("Not supported MoE backend!")
+                pytest.skip("MoE backend not supported on pre-Blackwell GPUs; using default only.")
             moe_config = MoeConfig()
             kv_cache_config = KvCacheConfig(free_gpu_memory_fraction=0.9)

Confirm intent: should TRTLLM run on GB200?


🏁 Script executed:

#!/bin/bash
rg -n "l0_gb200_multi_nodes" tests/integration/test_lists/test-db -n
rg -n "throughput_mtp_trtllm" tests/integration/test_lists/test-db

Length of output: 428


Widen SM version check for TRTLLM to include SM120

Test lists for GB200 include throughput_mtp_trtllm (l0_gb200_multi_nodes.yml:20, l0_dgx_b200.yml:74), but code currently only allows get_sm_version() == 100. If TRTLLM support on SM120 is intended, apply the diff below; otherwise remove this variant from GB200 lists.

-        if get_sm_version() == 100:
+        if get_sm_version() >= 100:
             moe_backend = "DEEPGEMM" if moe_backend == "_DEFAULT" else moe_backend
             moe_config = MoeConfig(backend=moe_backend, max_num_tokens=16384)
             kv_cache_config = KvCacheConfig(free_gpu_memory_fraction=0.6)
         else:
             if moe_backend != "_DEFAULT":
-                pytest.skip("Not supported MoE backend!")
+                pytest.skip("MoE backend not supported on pre-Blackwell GPUs; using default only.")
             moe_config = MoeConfig()
             kv_cache_config = KvCacheConfig(free_gpu_memory_fraction=0.9)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if get_sm_version() == 100:
moe_config = MoeConfig(backend="DEEPGEMM", max_num_tokens=16384)
moe_backend = "DEEPGEMM" if moe_backend == "_DEFAULT" else moe_backend
moe_config = MoeConfig(backend=moe_backend, max_num_tokens=16384)
kv_cache_config = KvCacheConfig(free_gpu_memory_fraction=0.6)
else:
if moe_backend != "_DEFAULT":
pytest.skip("Not supported MoE backend!")
moe_config = MoeConfig()
kv_cache_config = KvCacheConfig(free_gpu_memory_fraction=0.9)
if get_sm_version() >= 100:
moe_backend = "DEEPGEMM" if moe_backend == "_DEFAULT" else moe_backend
moe_config = MoeConfig(backend=moe_backend, max_num_tokens=16384)
kv_cache_config = KvCacheConfig(free_gpu_memory_fraction=0.6)
else:
if moe_backend != "_DEFAULT":
pytest.skip("MoE backend not supported on pre-Blackwell GPUs; using default only.")
moe_config = MoeConfig()
kv_cache_config = KvCacheConfig(free_gpu_memory_fraction=0.9)

@litaotju
Copy link
Collaborator

litaotju commented Sep 9, 2025

The added tests were passing on B200, skipping merge.

The risk is minimal, and only this new tests are using the code path.

https://prod.blsm.nvidia.com/sw-tensorrt-top-1/blue/organizations/jenkins/LLM%2Frelease-1.1.0rc2%2FL0_Test-x86_64-Multi-GPU/detail/L0_Test-x86_64-Multi-GPU/57/pipeline/1013/

@litaotju litaotju merged commit ef0d06d into NVIDIA:release/1.1.0rc2 Sep 9, 2025
7 of 9 checks passed
@tensorrt-cicd
Copy link
Collaborator

PR_Github #18228 [ run ] completed with state SUCCESS
/LLM/release-1.1.0rc2/L0_MergeRequest_PR pipeline #112 completed with status: 'FAILURE'

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

Labels

Release Blocker PRs that blocking the final release build or branching out the release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants