Skip to content

Conversation

@cheshirekow
Copy link
Collaborator

@cheshirekow cheshirekow commented Nov 21, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Improved error messaging for dependency initialization failures.
    • Fixed build output formatting.
  • Chores

    • Enhanced conditional support for NVTX in build configuration.
    • Improved Git submodule handling for third-party dependencies.

✏️ Tip: You can customize this high-level summary in your review settings.

Description

This change addresses the nitpick comments from coderabbit on the previous pull request !8986. None of the changes appear to be critical as the build is healthy without them, but they should provide some protection against future breakages if we change CMake version or or modify other build logic.

This change consists of the following:

  1. Add GIT_SUBMODULE_RECURSE ON to FetchContent_Declare calls for deepgemm and flashmla to ensure submodules are initialized in cmake versions where it is not the default.
  2. Modify error messages in deep_gemm and flash_mla CMakeLists to indicate that submodule initialization failed if the expected submodule directories are not present.
  3. Remove the NVTX include directories if the build is configured with NVTX_DISABLE off, to avoid potential confusions if NVTX is included on the compile commands when disabled.
  4. Fix a minor CMake syntax issue in cpp/CMakeLists.txt where a message() call was missing parentheses around a string.

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

  • 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

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

This change addresses the nitpick comments from coderabbit on the
previous pull request !8986. None of the changes appear to be critical
as the build is healthy without them, but they should provide some
protection against future breakages if we change CMake version or
or modify other build logic.

This change consists of the following:
1. Add GIT_SUBMODULE_RECURSE ON to FetchContent_Declare calls for
   deepgemm and flashmla to ensure submodules are initialized in
   cmake versions where it is not the default.
2. Modify error messages in deep_gemm and flash_mla CMakeLists to
   indicate that submodule initialization failed if the expected
   submodule directories are not present.
3. Remove the NVTX include directories if the build is configured
   with NVTX_DISABLE off, to avoid potential confusions if NVTX is
   included on the compile commands when disabled.
4. Fix a minor CMake syntax issue in cpp/CMakeLists.txt where a
   message() call was missing parentheses around a string.

Signed-off-by: Josh Bialkowski <[email protected]>
@cheshirekow cheshirekow requested a review from a team as a code owner November 21, 2025 17:25
@cheshirekow
Copy link
Collaborator Author

/bot run

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 21, 2025

📝 Walkthrough

Walkthrough

CMake configuration updates to enhance submodule Git recursion for deepgemm and flashmla dependencies, refactor submodule validation checks, and improve conditional NVTX include-path handling with formatting fixes in build logging.

Changes

Cohort / File(s) Change Summary
Submodule Git Recursion Configuration
3rdparty/CMakeLists.txt
Added GIT_SUBMODULES_RECURSE ON to FetchContent declarations for deepgemm and flashmla to enable recursive submodule initialization.
NVTX Include Path Conditional Logic
cpp/CMakeLists.txt
Introduced conditional NVTX include-dir variable that only defines the path when NVTX is enabled; updated torch-related CUDA setup to use new variable; fixed formatting in ucxx build message output.
Submodule Validation Refactoring
cpp/tensorrt_llm/deep_gemm/CMakeLists.txt
Removed specific submodule-not-found check and replaced with generic submodule-initialization error message tied to FetchContent.
Submodule Initialization Guard
cpp/tensorrt_llm/flash_mla/CMakeLists.txt
Added early validation guard checking for FLASH_MLA_SOURCE_DIR/csrc/cutlass/include existence with fatal error on missing submodule, placed before SM100/ARM64 compatibility checks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • cpp/CMakeLists.txt: Verify conditional NVTX logic correctly gates include paths and that formatting fix captures full output
  • cpp/tensorrt_llm/flash_mla/CMakeLists.txt: Confirm guard placement doesn't interfere with subsequent compiler compatibility checks
  • cpp/tensorrt_llm/deep_gemm/CMakeLists.txt: Validate error message change maintains clarity for debugging initialization failures

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: infrastructure fixes to 3rdparty CMakeLists files, with the JIRA ticket and type properly formatted.
Description check ✅ Passed The description is mostly complete with a clear explanation of changes and PR checklist completed. Test coverage section is empty but this is acceptable for infrastructure/CMake fixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent 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 9b2abb8 and dcecc3c.

📒 Files selected for processing (4)
  • 3rdparty/CMakeLists.txt (2 hunks)
  • cpp/CMakeLists.txt (3 hunks)
  • cpp/tensorrt_llm/deep_gemm/CMakeLists.txt (1 hunks)
  • cpp/tensorrt_llm/flash_mla/CMakeLists.txt (1 hunks)
🧰 Additional context used
🧠 Learnings (9)
📓 Common learnings
Learnt from: venkywonka
Repo: NVIDIA/TensorRT-LLM PR: 6029
File: .github/pull_request_template.md:45-53
Timestamp: 2025-08-27T17:50:13.264Z
Learning: For PR templates in TensorRT-LLM, avoid suggesting changes that would increase developer overhead, such as converting plain bullets to mandatory checkboxes. The team prefers guidance-style bullets that don't require explicit interaction to reduce friction in the PR creation process.
📚 Learning: 2025-08-08T05:06:31.596Z
Learnt from: sklevtsov-nvidia
Repo: NVIDIA/TensorRT-LLM PR: 3294
File: cpp/tensorrt_llm/cutlass_extensions/include/cutlass_extensions/epilogue/fusion/sm90_visitor_scatter.hpp:36-36
Timestamp: 2025-08-08T05:06:31.596Z
Learning: CUTLASS extension files (under cpp/tensorrt_llm/cutlass_extensions/) follow CUTLASS coding style conventions, including using #pragma once instead of TRTLLM_ prefixed header guards, even though they are .hpp files.

Applied to files:

  • cpp/tensorrt_llm/flash_mla/CMakeLists.txt
  • cpp/CMakeLists.txt
📚 Learning: 2025-09-23T15:01:00.070Z
Learnt from: nv-lschneider
Repo: NVIDIA/TensorRT-LLM PR: 7910
File: cpp/tensorrt_llm/kernels/nccl_device/config.cu:15-17
Timestamp: 2025-09-23T15:01:00.070Z
Learning: In TensorRT-LLM NCCL device kernels, the <sstream> header is not needed as an explicit include in config.cu because it's provided transitively through other headers. Local compilation testing confirms this works without the explicit include.

Applied to files:

  • cpp/tensorrt_llm/flash_mla/CMakeLists.txt
  • cpp/CMakeLists.txt
  • cpp/tensorrt_llm/deep_gemm/CMakeLists.txt
📚 Learning: 2025-09-23T15:13:48.819Z
Learnt from: nv-lschneider
Repo: NVIDIA/TensorRT-LLM PR: 7910
File: cpp/tensorrt_llm/kernels/nccl_device/multimem.h:20-30
Timestamp: 2025-09-23T15:13:48.819Z
Learning: TRT-LLM targets modern CUDA toolkits that support FP8 datatypes, so cuda_fp8.h can be included unconditionally without version guards in TRT-LLM code.

Applied to files:

  • cpp/tensorrt_llm/flash_mla/CMakeLists.txt
  • cpp/CMakeLists.txt
📚 Learning: 2025-08-21T21:48:35.135Z
Learnt from: djns99
Repo: NVIDIA/TensorRT-LLM PR: 7104
File: cpp/tensorrt_llm/cutlass_extensions/include/cutlass_extensions/epilogue/fusion/sm90_visitor_scatter.hpp:399-417
Timestamp: 2025-08-21T21:48:35.135Z
Learning: CUTLASS extensions in TensorRT-LLM (located under cpp/tensorrt_llm/cutlass_extensions/) are designed to integrate with and extend functionality in the external CUTLASS repository. When analyzing these extensions, their consumers and functionality wiring may exist in the CUTLASS codebase rather than within TensorRT-LLM itself.

Applied to files:

  • cpp/tensorrt_llm/flash_mla/CMakeLists.txt
📚 Learning: 2025-09-23T15:01:00.070Z
Learnt from: nv-lschneider
Repo: NVIDIA/TensorRT-LLM PR: 7910
File: cpp/tensorrt_llm/kernels/nccl_device/config.cu:15-17
Timestamp: 2025-09-23T15:01:00.070Z
Learning: In TensorRT-LLM NCCL device kernels (cpp/tensorrt_llm/kernels/nccl_device/config.cu), std::ostringstream is used but <sstream> doesn't need to be explicitly included because it's provided transitively through other headers like tensorrt_llm/common/cudaUtils.h or config.h. Local compilation testing confirms this works without the explicit include.

Applied to files:

  • cpp/tensorrt_llm/flash_mla/CMakeLists.txt
  • cpp/CMakeLists.txt
  • cpp/tensorrt_llm/deep_gemm/CMakeLists.txt
📚 Learning: 2025-08-22T01:54:35.850Z
Learnt from: djns99
Repo: NVIDIA/TensorRT-LLM PR: 7104
File: cpp/tensorrt_llm/kernels/cutlass_kernels/include/moe_kernels.h:999-1000
Timestamp: 2025-08-22T01:54:35.850Z
Learning: The `internal_cutlass_kernels` directory in TensorRT-LLM is a mirror of an internal NVIDIA repository and maintains its own implementation and API that may diverge from the public `cutlass_kernels` version. API inconsistencies between these two directories are intentional and by design, not bugs to be fixed.

Applied to files:

  • cpp/tensorrt_llm/flash_mla/CMakeLists.txt
📚 Learning: 2025-08-18T09:08:07.687Z
Learnt from: tongyuantongyu
Repo: NVIDIA/TensorRT-LLM PR: 6984
File: cpp/tensorrt_llm/CMakeLists.txt:297-299
Timestamp: 2025-08-18T09:08:07.687Z
Learning: In the TensorRT-LLM project, artifacts are manually copied rather than installed via `cmake --install`, so INSTALL_RPATH properties are not needed - only BUILD_RPATH affects the final artifacts.

Applied to files:

  • cpp/tensorrt_llm/deep_gemm/CMakeLists.txt
📚 Learning: 2025-08-06T13:58:07.506Z
Learnt from: galagam
Repo: NVIDIA/TensorRT-LLM PR: 6487
File: tests/unittest/_torch/auto_deploy/unit/singlegpu/test_ad_trtllm_bench.py:1-12
Timestamp: 2025-08-06T13:58:07.506Z
Learning: In TensorRT-LLM, test files (files under tests/ directories) do not require NVIDIA copyright headers, unlike production source code files. Test files typically start directly with imports, docstrings, or code.

Applied to files:

  • cpp/tensorrt_llm/deep_gemm/CMakeLists.txt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Pre-commit Check
🔇 Additional comments (8)
cpp/tensorrt_llm/flash_mla/CMakeLists.txt (1)

14-20: Submodule initialization guard is well-placed and clear.

The check correctly validates that the FlashMLA submodule was initialized before proceeding with build configuration. Positioning it before the SM100/ARM64 compiler compatibility logic ensures initialization issues are caught early.

cpp/tensorrt_llm/deep_gemm/CMakeLists.txt (1)

14-20: Submodule check is consistent and correct.

The error message update aligns with the flash_mla pattern. Note: the \n at the end of the message string is redundant since CMake's message() function automatically appends a newline, but it is harmless.

3rdparty/CMakeLists.txt (2)

43-44: GIT_SUBMODULES_RECURSE addition is correct and necessary.

Enabling recursive submodule initialization for deepgemm ensures nested submodules (like cutlass) are automatically fetched across CMake versions where this behavior may not be default.


58-59: GIT_SUBMODULES_RECURSE addition is correct and necessary.

Enabling recursive submodule initialization for flashmla ensures nested submodules (like cutlass) are automatically fetched across CMake versions where this behavior may not be default.

cpp/CMakeLists.txt (4)

273-275: Conditional NVTX include setup correctly prevents unwanted includes.

The variable maybe_nvtx_includedir is only set when NVTX is enabled, ensuring that when NVTX_DISABLE=ON, no NVTX paths are added to the include directories. This aligns with the PR objective.


278-287: Conditional NVTX include directory integration is correct.

The use of ${maybe_nvtx_includedir} in include_directories() safely handles both cases: when NVTX is enabled, the path is included; when disabled, the undefined variable expands to empty string (no-op).


500-503: Verify nvtx3_dir assignment behavior with respect to NVTX_DISABLE.

Line 501 unconditionally sets nvtx3_dir to the FetchContent cache directory, but the nvtx package is only made available when NOT NVTX_DISABLE (line 265–267). If find_package(Torch) depends on this variable, it may fail when NVTX is disabled and the directory doesn't exist. Please confirm that this is handled correctly (either the assignment should be conditional on NOT NVTX_DISABLE, or find_package(Torch) gracefully handles a missing directory).


577-580: Message formatting syntax is now correct.

The message() call at line 578 has proper parentheses and formatting, resolving the CMake syntax issue mentioned in the PR objectives.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #25380 [ run ] triggered by Bot. Commit: dcecc3c

@tensorrt-cicd
Copy link
Collaborator

PR_Github #25380 [ run ] completed with state SUCCESS. Commit: dcecc3c
/LLM/main/L0_MergeRequest_PR pipeline #19198 completed with status: 'SUCCESS'
Pipeline passed with automatic retried tests. Check the rerun report for details.

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