Skip to content

Conversation

@ZhanruiSunCh
Copy link
Collaborator

@ZhanruiSunCh ZhanruiSunCh commented Nov 10, 2025

Summary by CodeRabbit

  • New Features

    • Added CUDA 12.9 build support for x86_64 and AArch64 architectures
    • Added protobuf dependency with version constraint (≥4.25.8)
  • Bug Fixes

    • Fixed PyTorch ABI compatibility handling
    • Enabled previously skipped tests for Nemotron H and Mamba2 functionality
  • Documentation

    • Added CUDA version compatibility guidance for TensorRT LLM 1.1
    • Updated build instructions for NVIDIA Blackwell GPUs and SBSA platforms
  • Chores

    • Updated PyTorch to 2.8.0 and related dependencies
    • Updated TensorRT, CUDA toolkit, and container base images
    • Updated NVIDIA container versions and build infrastructure

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

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

…/ triton 3.5.0 (NVIDIA#8838)"

This reverts commit 4de31be.

Signed-off-by: ZhanruiSunCh <184402041+ZhanruiSunCh@users.noreply.github.com>
@ZhanruiSunCh
Copy link
Collaborator Author

/bot run --stage-list "BuildDockerImages"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #23992 [ run ] triggered by Bot. Commit: 94c150a

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 10, 2025

📝 Walkthrough

Walkthrough

This PR downgrades and reorganizes NVIDIA/PyTorch dependencies (Docker base images, CUDA toolkit, TensorRT versions), introduces CUDA 12.9 (CU12) build support alongside existing CUDA 13.0 support via new Jenkins configurations and Docker image variants, adds protobuf installation support across the stack, updates PyTorch to 2.8.0 with cu128 wheels, and modifies installation and build workflows to handle multiple CUDA versions.

Changes

Cohort / File(s) Summary
Docker base image and version downgrades
constraints.txt, docker/common/install_cuda_toolkit.sh, docker/common/install_tensorrt.sh, docker/Makefile
Updated base images from pytorch:25.10-py3 to pytorch:25.06-py3 and NVIDIA CUDA tags from 13.0.1/13.0.2 to 13.0.0; downgraded multiple component versions (TRT, CUDNN, CUBLAS, NVRTC, CUDA_RUNTIME, CUDA_DRIVER)
Docker multi-stage build refactoring
docker/Dockerfile.multi
Reorganized installation of UCX, NIXL, and ETCD; added separate COPY and RUN steps; introduced protobuf installation alongside OpenCV; added post-installation cleanup for PyTorch-Triton package renaming; adjusted multi-stage copy strategy
Installation script enhancements
docker/common/install.sh, docker/common/install_mpi4py.sh, docker/common/install_pytorch.sh
Added protobuf feature flag and --protobuf option; downgraded PyTorch from 2.9.0 to 2.8.0; updated CUDA wheel index from cu130 to cu128; enhanced MPI rank-based CUDA device setup with error handling for SLURM/OMPI rank detection
Jenkins CI/CD CUDA 12.9 support
jenkins/Build.groovy, jenkins/L0_Test.groovy, jenkins/current_image_tags.properties
Introduced CU12 build and test configurations with new docker image constants (LLM_DOCKER_IMAGE_12_9, variants); added CONFIG_LINUX_X86_64_VANILLA_CU12 and CONFIG_LINUX_AARCH64_CU12; extended build/test orchestration with CU12-specific logic and image selection; updated requirements patching for CUDA 12.9 compatibility
Jenkins infrastructure updates
jenkins/controlCCache.groovy
Updated Docker image tag from pytorch-25.10 to pytorch-25.06
Python dependencies
requirements.txt, scripts/build_wheel.py
Updated extra index URL cu130 to cu128; added CUDA 12.9-specific dependency lines with toggling logic; pinned PyTorch to 2.8.0; downgraded Triton to 3.3.1; introduced modify_requirements_for_cuda function to uncomment/comment CUDA 12/13 dependencies based on CUDA_VERSION
Documentation updates
docs/source/installation/build-from-source-linux.md, docs/source/installation/linux.md, docs/source/legacy/reference/support-matrix.md
Added CUDA 12.9/13.0 compatibility guidance; updated PyTorch install command for Blackwell GPU support (torch==2.7.1, cu128); updated container version reference from 25.10 to 25.08
Torch ABI handling
tensorrt_llm/_utils.py
Removed fallback code path for older Torch versions in torch_pybind11_abi; now unconditionally uses torch._C._PYBIND11_COMPILER_TYPE and related constants
Test configuration updates
tests/integration/test_lists/waives.txt, tests/unittest/_torch/modeling/test_modeling_nemotron_h.py, tests/unittest/_torch/thop/parallel/test_mamba2_chunk_ss_update.py
Removed skip decorators to enable test execution; removed skip entry for DeepSeekV3Lite test; added skip entry for disaggregated auto-scaling test

Sequence Diagram(s)

sequenceDiagram
    participant Build as Build Pipeline
    participant Detect as CUDA Detector
    participant Modify as Modify Requirements
    participant Docker as Docker Build
    participant Install as Install Deps

    Build->>Detect: Check CUDA_VERSION
    alt CUDA 12.x Detected
        Detect->>Modify: CUDA 12.x found
        Modify->>Modify: Uncomment CUDA 12.9 deps<br/>Comment CUDA 13 deps
    else CUDA 13.x Detected
        Detect->>Modify: CUDA 13.x found
        Modify->>Modify: Keep CUDA 13 deps active
    end
    Modify->>Docker: Updated requirements.txt
    Docker->>Install: Build with patched deps
    Install->>Install: Install CUDA-specific packages
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Areas requiring extra attention:

  • jenkins/Build.groovy and jenkins/L0_Test.groovy: Substantial new CU12 build logic, conditional image selection, and tarball handling; verify that CU12 paths correctly route through appropriate configurations and that fallback to non-CU12 paths remains functional
  • docker/Dockerfile.multi: Multi-stage reorganization of UCX/NIXL/ETCD installation and PyTorch-Triton renaming logic; confirm all installation steps are included in both standard and Triton-specific paths
  • scripts/build_wheel.py and requirements.txt: CUDA 12.9 dependency toggling logic; ensure toggling correctly activates/deactivates appropriate lines and that both CUDA 12.9 and 13.0 paths remain valid
  • docker/common/install_mpi4py.sh: New rank detection and device setup logic with SLURM/OMPI fallback; verify error handling when neither rank variable is set
  • Interdependencies: Verify that Jenkins CU12 configs correctly propagate is_cu12 flag through build pipelines and that Docker image selection aligns with build requirements

Possibly related PRs

Suggested reviewers

  • laikhtewari
  • lucaslie
  • venkywonka
  • Shixiaowei02
  • kxdc

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description consists entirely of the template guidance and GitHub bot documentation, with no actual content in the Description or Test Coverage sections, and only the checkbox marked without explanations. Add concrete description explaining why this revert is necessary, provide specific test coverage details, and complete the PR checklist items with relevant information.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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 clearly indicates this is a revert of a previous infra upgrade (TRTLLM-8994), downgrading DLFW from 25.10, PyTorch from 2.9.0, and Triton from 3.5.0, which aligns with the changeset showing downgrades across multiple version dependencies.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • 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: 5

🧹 Nitpick comments (5)
docker/common/install_mpi4py.sh (1)

34-67: Review CUDA device setup logic for edge cases.

The added MPI+KVCACHE CUDA device setup logic has several considerations:

  1. Rank selection logic (lines 48-54): The condition checks if both slurm_rank>0 and ompi_rank>0, but the earlier elif ensures only one is set. Consider simplifying:

    -        if(has_slurm_rank and has_ompi_rank):
    -            if(slurm_rank>0 and ompi_rank>0):
    -                raise RuntimeError("Only one of SLURM_PROCID or OMPI_COMM_WORLD_RANK should >0 when TRTLLM_USE_MPI_KVCACHE is set to 1")
    -            else:
    -                rank=slurm_rank if slurm_rank>0 else ompi_rank
    -        else:
    -            rank = ompi_rank if has_ompi_rank else slurm_rank
    +        rank = ompi_rank if has_ompi_rank else slurm_rank
  2. CUASSERT return handling (lines 56-64): The function returns None or unpacked values. Ensure callers handle both cases correctly.

  3. Device selection (line 66): Using rank % device_count assumes homogeneous GPU distribution. Document this assumption or add validation.

docker/Dockerfile.multi (1)

4-5: Document the version downgrade rationale.

The base image tags are being downgraded from 25.10-py3/25.09-py3 to 25.08-py3. While the PR title mentions this is a revert, consider adding a comment explaining why 25.08-py3 specifically was chosen as the target version.

scripts/build_wheel.py (2)

950-979: Consider using a temporary requirements file instead of mutating the source.

The function modifies requirements.txt in place, which has several drawbacks:

  • Not safe for version control: developers may accidentally commit the modified file
  • Not idempotent: running the build twice could corrupt the file
  • No cleanup: the original file is permanently modified

Consider instead:

  1. Creating a temporary copy of requirements.txt with modifications
  2. Using pip's --constraint mechanism to override specific dependencies
  3. Using environment markers in requirements.txt (e.g., torch==2.8.0; os.environ["CUDA_VERSION"].startswith("12"))

If the current approach is retained, add safeguards:

  • Validate the file structure before and after modifications
  • Document that developers should not commit changes to requirements.txt after builds
  • Consider adding a restoration step in a finally block
 def modify_requirements_for_cuda():
     requirements_file = project_dir / "requirements.txt"
+    # Create backup
+    backup_file = requirements_file.with_suffix('.txt.bak')
+    shutil.copy2(requirements_file, backup_file)
+    try:
         if os.environ.get("CUDA_VERSION", "").startswith("12."):
             print(
                 "Detected CUDA 12 environment, modifying requirements.txt for wheel build..."
             )
             # ... existing logic ...
             return True
         return False
+    except Exception as e:
+        # Restore on error
+        shutil.copy2(backup_file, requirements_file)
+        raise
+    finally:
+        backup_file.unlink(missing_ok=True)

962-972: Fragile pattern matching could fail silently.

The code assumes:

  1. Lines with <For CUDA 12.9> are always commented with # prefix
  2. The CUDA 13 dependency is always on the next line
  3. Simple string replacement "# " won't match unintended comments

If requirements.txt structure changes, this could:

  • Miss intended lines
  • Uncomment wrong lines
  • Corrupt the file

Consider adding validation:

  • Check that uncommented line starts with expected dependency names
  • Verify the next line is indeed a CUDA 13 dependency before commenting
  • Log warnings if expected patterns aren't found
                     line = lines[i]
                     if "<For CUDA 12.9>" in line and line.strip().startswith(
                             "#"):
+                        # Validate this is a dependency line we expect
+                        if not any(dep in line for dep in ["cuda-python", "nvidia-ml-py", "tensorrt", "torch", "nvidia-nccl", "nvidia-cuda-nvrtc"]):
+                            warnings.warn(f"Unexpected CUDA 12.9 marker in line: {line}")
+                            modified_lines.append(line)
+                            continue
                         new_line = line.replace("# ", "", 1)
                         print(
                             f"Enable CUDA 12.9 dependency: {new_line.strip()}")
                         modified_lines.append(new_line)
+                        # Validate next line is a dependency (not a comment or blank)
+                        if i + 1 >= len(lines) or lines[i + 1].strip().startswith("#") or not lines[i + 1].strip():
+                            warnings.warn(f"Expected CUDA 13 dependency after CUDA 12.9 line, got: {lines[i+1] if i+1 < len(lines) else 'EOF'}")
                         print(
                             f"Disable CUDA 13 dependency: # {lines[i + 1].strip()}"
                         )
                         modified_lines.append("# " + lines[i + 1])
requirements.txt (1)

78-78: Document the nvbugs/5501820 WAR more clearly.

The comment references "WAR for nvbugs/5501820" but doesn't explain what issue numba-cuda>=0.19.0 addresses. Consider adding a brief description for future maintainers.

-numba-cuda>=0.19.0 # WAR for nvbugs/5501820
+numba-cuda>=0.19.0 # WAR for nvbugs/5501820: [brief description of the issue]
📜 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 f848d84 and 94c150a.

📒 Files selected for processing (21)
  • constraints.txt (1 hunks)
  • docker/Dockerfile.multi (3 hunks)
  • docker/Makefile (1 hunks)
  • docker/common/install.sh (4 hunks)
  • docker/common/install_cuda_toolkit.sh (1 hunks)
  • docker/common/install_mpi4py.sh (1 hunks)
  • docker/common/install_pytorch.sh (2 hunks)
  • docker/common/install_tensorrt.sh (1 hunks)
  • docs/source/installation/build-from-source-linux.md (1 hunks)
  • docs/source/installation/linux.md (1 hunks)
  • docs/source/legacy/reference/support-matrix.md (1 hunks)
  • jenkins/Build.groovy (8 hunks)
  • jenkins/L0_Test.groovy (15 hunks)
  • jenkins/controlCCache.groovy (1 hunks)
  • jenkins/current_image_tags.properties (1 hunks)
  • requirements.txt (3 hunks)
  • scripts/build_wheel.py (1 hunks)
  • tensorrt_llm/_utils.py (1 hunks)
  • tests/integration/test_lists/waives.txt (1 hunks)
  • tests/unittest/_torch/modeling/test_modeling_nemotron_h.py (0 hunks)
  • tests/unittest/_torch/thop/parallel/test_mamba2_chunk_ss_update.py (0 hunks)
💤 Files with no reviewable changes (2)
  • tests/unittest/_torch/thop/parallel/test_mamba2_chunk_ss_update.py
  • tests/unittest/_torch/modeling/test_modeling_nemotron_h.py
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{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:

  • tensorrt_llm/_utils.py
  • scripts/build_wheel.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:

  • tensorrt_llm/_utils.py
  • scripts/build_wheel.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:

  • tensorrt_llm/_utils.py
  • scripts/build_wheel.py
🧠 Learnings (23)
📚 Learning: 2025-09-17T02:48:52.732Z
Learnt from: tongyuantongyu
Repo: NVIDIA/TensorRT-LLM PR: 7781
File: tests/integration/test_lists/waives.txt:313-313
Timestamp: 2025-09-17T02:48:52.732Z
Learning: In TensorRT-LLM, `tests/integration/test_lists/waives.txt` is specifically for waiving/skipping tests, while other test list files like those in `test-db/` and `qa/` directories are for different test execution contexts (pre-merge, post-merge, QA tests). The same test appearing in both waives.txt and execution list files is intentional - the test is part of test suites but will be skipped due to the waiver.

Applied to files:

  • tests/integration/test_lists/waives.txt
📚 Learning: 2025-08-29T14:07:45.863Z
Learnt from: EmmaQiaoCh
Repo: NVIDIA/TensorRT-LLM PR: 7370
File: tests/unittest/trt/model_api/test_model_quantization.py:24-27
Timestamp: 2025-08-29T14:07:45.863Z
Learning: In TensorRT-LLM's CI infrastructure, pytest skip markers (pytest.mark.skip) are properly honored even when test files have __main__ blocks that call test functions directly. The testing system correctly skips tests without requiring modifications to the __main__ block execution pattern.

Applied to files:

  • tests/integration/test_lists/waives.txt
📚 Learning: 2025-07-28T17:06:08.621Z
Learnt from: moraxu
Repo: NVIDIA/TensorRT-LLM PR: 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/test_lists/waives.txt
  • jenkins/L0_Test.groovy
  • docs/source/installation/build-from-source-linux.md
📚 Learning: 2025-08-26T09:49:04.956Z
Learnt from: pengbowang-nv
Repo: NVIDIA/TensorRT-LLM PR: 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/waives.txt
📚 Learning: 2025-09-09T09:40:45.658Z
Learnt from: fredricz-20070104
Repo: NVIDIA/TensorRT-LLM PR: 7645
File: tests/integration/test_lists/qa/llm_function_core.txt:648-648
Timestamp: 2025-09-09T09:40:45.658Z
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/waives.txt
  • jenkins/current_image_tags.properties
  • jenkins/L0_Test.groovy
  • docs/source/installation/build-from-source-linux.md
📚 Learning: 2025-08-21T02:39:12.009Z
Learnt from: djns99
Repo: NVIDIA/TensorRT-LLM PR: 7104
File: cpp/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_kernels.cu:1475-1480
Timestamp: 2025-08-21T02:39:12.009Z
Learning: The min latency mode functionality in TensorRT-LLM MOE kernels (cpp/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_kernels.cu) is deprecated and no longer being maintained/updated, as confirmed by djns99. Bug reports and optimization suggestions for the computeStridesTmaWarpSpecializedLowLatencyKernel and related min latency code paths should be deprioritized.

Applied to files:

  • tests/integration/test_lists/waives.txt
📚 Learning: 2025-09-19T21:28:13.751Z
Learnt from: jhaotingc
Repo: NVIDIA/TensorRT-LLM PR: 7856
File: cpp/tensorrt_llm/thop/fp8BlockScaleMoe.cpp:159-166
Timestamp: 2025-09-19T21:28:13.751Z
Learning: In TensorRT-LLM blockScaleMoe routing (cpp/tensorrt_llm/kernels/trtllmGenKernels/blockScaleMoe/runner.cu), the DeepSeek routing method performs reinterpret_cast<float*>(routingLogits) at line 89, which could cause issues if routing_logits are BF16. However, Qwen3-FP8 models use RenormalizeNaive routing method and are not affected by this dtype casting issue.

Applied to files:

  • tests/integration/test_lists/waives.txt
📚 Learning: 2025-09-17T06:01:01.836Z
Learnt from: fredricz-20070104
Repo: NVIDIA/TensorRT-LLM PR: 7785
File: tests/integration/defs/perf/utils.py:321-333
Timestamp: 2025-09-17T06:01:01.836Z
Learning: In test infrastructure code for disaggregated serving tests, prefer logging errors and continuing execution rather than raising exceptions on timeout, to avoid disrupting test cleanup and causing cascading failures.

Applied to files:

  • tests/integration/test_lists/waives.txt
📚 Learning: 2025-08-21T00:16:56.457Z
Learnt from: farshadghodsian
Repo: NVIDIA/TensorRT-LLM PR: 7101
File: docs/source/blogs/tech_blog/blog9_Deploying_GPT_OSS_on_TRTLLM.md:36-36
Timestamp: 2025-08-21T00:16:56.457Z
Learning: TensorRT-LLM container release tags in documentation should only reference published NGC container images. The README badge version may be ahead of the actual published container versions.

Applied to files:

  • docs/source/legacy/reference/support-matrix.md
  • jenkins/current_image_tags.properties
  • docker/common/install_tensorrt.sh
  • docs/source/installation/linux.md
  • docs/source/installation/build-from-source-linux.md
📚 Learning: 2025-08-14T15:38:01.771Z
Learnt from: MatthiasKohl
Repo: NVIDIA/TensorRT-LLM PR: 6904
File: cpp/tensorrt_llm/pybind/thop/bindings.cpp:55-57
Timestamp: 2025-08-14T15:38:01.771Z
Learning: In TensorRT-LLM Python bindings, tensor parameter collections like mla_tensor_params and spec_decoding_tensor_params are kept as required parameters without defaults to maintain API consistency, even when it might affect backward compatibility.

Applied to files:

  • tensorrt_llm/_utils.py
📚 Learning: 2025-09-23T15:12:38.312Z
Learnt from: nv-lschneider
Repo: NVIDIA/TensorRT-LLM PR: 7910
File: cpp/tensorrt_llm/thop/allreduceOp.cpp:352-446
Timestamp: 2025-09-23T15:12:38.312Z
Learning: In TensorRT-LLM NCCL device implementation, NCCL version 2.28+ requirements are handled at runtime in the nccl_device/config layer rather than with compile-time guards. This allows the allreduceOp to remain version-agnostic and delegates version compatibility validation to the appropriate lower-level components that can gracefully handle unsupported configurations.

Applied to files:

  • tensorrt_llm/_utils.py
  • docs/source/installation/linux.md
  • docs/source/installation/build-from-source-linux.md
📚 Learning: 2025-08-27T14:23:55.566Z
Learnt from: ixlmar
Repo: NVIDIA/TensorRT-LLM PR: 7294
File: tensorrt_llm/_torch/modules/rms_norm.py:17-17
Timestamp: 2025-08-27T14:23:55.566Z
Learning: The TensorRT-LLM project requires Python 3.10+ as evidenced by the use of TypeAlias from typing module, match/case statements, and union type | syntax throughout the codebase, despite some documentation still mentioning Python 3.8+.

Applied to files:

  • tensorrt_llm/_utils.py
  • docs/source/installation/linux.md
  • docs/source/installation/build-from-source-linux.md
📚 Learning: 2025-08-19T12:45:11.997Z
Learnt from: amitz-nv
Repo: NVIDIA/TensorRT-LLM PR: 7033
File: tensorrt_llm/_torch/pyexecutor/model_engine.py:0-0
Timestamp: 2025-08-19T12:45:11.997Z
Learning: In tensorrt_llm/_torch/pyexecutor/model_engine.py, DoRA (Delta Orthogonal Rank Adaptation) functionality was removed from the PyTorch flow to eliminate issues with inverted DoRA detection logic. The original is_dora condition was checking if scaling_vec_pointer == 0, which was potentially incorrect.

Applied to files:

  • tensorrt_llm/_utils.py
📚 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:

  • tensorrt_llm/_utils.py
📚 Learning: 2025-09-16T09:30:09.716Z
Learnt from: tongyuantongyu
Repo: NVIDIA/TensorRT-LLM PR: 7763
File: cpp/tensorrt_llm/CMakeLists.txt:297-301
Timestamp: 2025-09-16T09:30:09.716Z
Learning: In the TensorRT-LLM project, NCCL libraries are loaded earlier by PyTorch libraries or the bindings library, so the main shared library doesn't need NCCL paths in its RPATH - the libraries will already be available in the process address space when needed.

Applied to files:

  • tensorrt_llm/_utils.py
  • docs/source/installation/linux.md
  • docs/source/installation/build-from-source-linux.md
📚 Learning: 2025-08-01T15:14:45.673Z
Learnt from: yibinl-nvidia
Repo: NVIDIA/TensorRT-LLM PR: 6506
File: examples/models/core/mixtral/requirements.txt:3-3
Timestamp: 2025-08-01T15:14:45.673Z
Learning: In TensorRT-LLM, examples directory can have different dependency versions than the root requirements.txt file. Version conflicts between root and examples dependencies are acceptable because examples are designed to be standalone and self-contained.

Applied to files:

  • jenkins/current_image_tags.properties
  • jenkins/L0_Test.groovy
  • docs/source/installation/linux.md
  • docs/source/installation/build-from-source-linux.md
📚 Learning: 2025-10-17T13:21:31.724Z
Learnt from: ixlmar
Repo: NVIDIA/TensorRT-LLM PR: 8398
File: tensorrt_llm/_torch/pyexecutor/sampling_utils.py:237-272
Timestamp: 2025-10-17T13:21:31.724Z
Learning: The setup.py file in TensorRT-LLM explicitly requires Python 3.10+ via `python_requires=">=3.10, <4"`, making match/case statements and other Python 3.10+ features appropriate throughout the codebase.

Applied to files:

  • requirements.txt
  • docs/source/installation/linux.md
  • docs/source/installation/build-from-source-linux.md
📚 Learning: 2025-08-20T15:04:42.885Z
Learnt from: dbari
Repo: NVIDIA/TensorRT-LLM PR: 7095
File: docker/Dockerfile.multi:168-168
Timestamp: 2025-08-20T15:04:42.885Z
Learning: In docker/Dockerfile.multi, wildcard COPY for benchmarks (${CPP_BUILD_DIR}/benchmarks/*Benchmark) is intentionally used instead of directory copy because the benchmarks directory contains various other build artifacts during C++ builds, and only specific benchmark executables should be copied to the final image.

Applied to files:

  • docker/Dockerfile.multi
📚 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:

  • jenkins/Build.groovy
  • jenkins/L0_Test.groovy
  • docs/source/installation/linux.md
  • docs/source/installation/build-from-source-linux.md
📚 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:

  • jenkins/L0_Test.groovy
  • docs/source/installation/build-from-source-linux.md
📚 Learning: 2025-08-11T20:09:24.389Z
Learnt from: achartier
Repo: NVIDIA/TensorRT-LLM PR: 6763
File: tests/integration/defs/triton_server/conftest.py:16-22
Timestamp: 2025-08-11T20:09:24.389Z
Learning: In the TensorRT-LLM test infrastructure, the team prefers simple, direct solutions (like hard-coding directory traversal counts) over more complex but robust approaches when dealing with stable directory structures. They accept the maintenance cost of updating tests if the layout changes.

Applied to files:

  • jenkins/L0_Test.groovy
  • docs/source/installation/build-from-source-linux.md
📚 Learning: 2025-08-26T09:37:10.463Z
Learnt from: jiaganc
Repo: NVIDIA/TensorRT-LLM PR: 7031
File: tensorrt_llm/bench/dataclasses/configuration.py:90-104
Timestamp: 2025-08-26T09:37:10.463Z
Learning: In TensorRT-LLM's bench configuration, the `get_pytorch_perf_config()` method returns `self.pytorch_config` which is a Dict[str, Any] that can contain default values including `cuda_graph_config`, making the fallback `llm_args["cuda_graph_config"]` safe to use.

Applied to files:

  • jenkins/L0_Test.groovy
📚 Learning: 2025-08-27T17:50:13.264Z
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.

Applied to files:

  • docs/source/installation/linux.md
  • docs/source/installation/build-from-source-linux.md
⏰ 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 (17)
docs/source/legacy/reference/support-matrix.md (1)

155-155: No issues found. The change correctly references a published NGC container image.

The verification confirms that NVIDIA DLFW container version 25.08 is published on NGC, meeting the requirement that documentation should only reference published container images. The documentation update is valid.

tests/integration/test_lists/waives.txt (1)

420-420: LGTM! Test waiver changes are properly documented.

The addition of the disaggregated server restart test skip with bug reference (https://nvbugs/5633340) is appropriate, and the removal of the TestDeepSeekV3Lite skip entry suggests that test is now expected to pass.

Based on learnings

docker/Makefile (1)

195-204: LGTM! CUDA version downgrade is consistent.

The BASE_TAG versions are being downgraded from 13.0.1 to 13.0.0 across multiple build targets, which aligns with the CUDA toolkit version change in docker/common/install_cuda_toolkit.sh (line 8: CUDA_VER="13.0.0_580.65.06").

docker/common/install_cuda_toolkit.sh (1)

8-8: CUDA versions are consistent across all references.

Verification complete:

  • install_cuda_toolkit.sh:8 → CUDA 13.0.0 with driver 580.65.06
  • install_tensorrt.sh:8 → CUDA 13.0 (annotated "13.0.0")
  • docker/Makefile:195,199,204 → BASE_TAG all reference 13.0.0-devel-*

All CUDA version references align with the intentional downgrade from DLFW 25.10 to 25.08.

tensorrt_llm/_utils.py (1)

1189-1193: Fallback removal is safe with PyTorch 2.8.0+ minimum version.

The code now directly accesses torch._C._PYBIND11_COMPILER_TYPE, _PYBIND11_STDLIB, and _PYBIND11_BUILD_ABI without fallback checks. The minimum PyTorch version is 2.8.0, and these PyBind11 ABI attributes were introduced in PyTorch around 2021-2023. PyTorch 2.8.0 (released early 2025) is well after this introduction, so these attributes are guaranteed to exist. The simplification removes unnecessary defensive code that only protected against much older PyTorch versions no longer supported by this project.

docker/common/install_tensorrt.sh (1)

5-21: Verify NVIDIA stack version rollback is documented

Search of docs/ found only docs/source/legacy/reference/support-matrix.md referencing PyTorch 25.08; no other docs matched the TensorRT/cuDNN/CUDA version patterns. Update documentation and release notes:

  • Update docs/source/legacy/reference/support-matrix.md (and any README/release-note/CHANGELOG) to reflect the downgraded stack: TensorRT 10.13.2.6; cuDNN 9.12.0.46-1; cuBLAS 13.0.0.19-1; CUDA runtime 13.0.48-1; CUDA driver 580.65.06.
  • Add a release-note / changelog entry describing the rollback and any compatibility or performance implications.
  • Search the entire repository (README, release notes, badges, external docs/NGC references) for these versions and update any occurrences.
jenkins/controlCCache.groovy (1)

4-4: LGTM: Docker image downgrade is consistent with the revert intent.

The image reference change aligns with the PR's goal of reverting to an earlier DLFW version.

docker/common/install_pytorch.sh (3)

72-73: Good addition: torchaudio now explicitly managed.

Adding torchaudio to the uninstall and install steps ensures consistency with the PyTorch ecosystem.


7-8: Update TORCH_VERSION to match NVIDIA 25.08 release notes specification.

The comment references NVIDIA rel-25-08 release notes, which specify PyTorch 2.8.0a0, but the code sets TORCH_VERSION="2.8.0" (stable). Clarify whether 2.8.0 is intentional or if it should be updated to 2.8.0a0 to align with the referenced release.


72-73: No changes needed — cu128 wheel is compatible with CUDA 12.9.

The torch+cu128 wheel is built for CUDA 12.8 but will run with CUDA 12.9 due to forward-compatibility of NVIDIA drivers and runtime. Using cu128 in the wheel URL is the correct choice for this configuration and will work properly with CUDA 12.9.

docker/common/install.sh (2)

19-19: Good implementation: protobuf option follows established patterns.

The new --protobuf option is cleanly integrated following the same pattern as existing options like --opencv. It's properly included in the --all aggregate option.

Also applies to: 59-62, 73-73


139-144: Protobuf installation correctly addresses security advisory.

The protobuf version constraint >=4.25.8 matches the constraint in constraints.txt and properly addresses the inherited security issues from the base image.

requirements.txt (3)

1-1: Clarify cu128 wheel compatibility with CUDA 12.9.

The extra index URL uses cu128, but multiple comments throughout the file reference "CUDA 12.9" support. This is the same concern raised in docker/common/install_pytorch.sh.

Please verify:

  1. Does cu128 wheel support CUDA 12.9 runtime?
  2. Should this be cu129 instead?
  3. Or is cu128 the correct/latest wheel for CUDA 12.x series?

6-35: CUDA version conditional dependencies well-structured for build script.

The pattern of commented CUDA 12.9 lines followed by active CUDA 13 lines is consistent and matches what scripts/build_wheel.py's modify_requirements_for_cuda() function expects to parse.

However, ensure this pattern is maintained when adding new dependencies, as the build script relies on this specific structure.


26-28: Version constraint is correct and compatible with NVIDIA DLFW 25.08.

PyTorch 2.8.0 (stable) was released on August 6, 2025, and DLFW 25.08 is intended to be compatible with PyTorch 2.8. The constraint torch>=2.8.0a0,<=2.8.0 properly allows both the alpha version DLFW 25.08 uses and the stable release, preventing incompatible version drift.

jenkins/current_image_tags.properties (1)

16-23: Dual CUDA version configuration verified and properly integrated.

The script output confirms that both the new _12_9 and existing non-suffixed variables are:

  • Correctly defined in jenkins/current_image_tags.properties (lines 16-23)
  • Actively used with proper conditional logic in Jenkins pipelines
  • Build.groovy (line 573): Selects _12_9 variants for CUDA 12.9 builds
  • L0_Test.groovy (lines 2686, 2771): Uses ternary operators to branch on test configuration name (key.contains("-CU12-"))

The conditional selection pattern ensures appropriate image versions are used based on target CUDA version, with no orphaned variable references.

constraints.txt (1)

1-5: No issues found—protobuf constraint is correct.

The advisory GHSA-8qvm-5x2c-j2w7 is confirmed to affect protobuf-python, and version 4.25.8 is the correct minimum patched version for the 4.x line. The constraint protobuf>=4.25.8 properly addresses the high-severity vulnerability referenced in the comment.

Comment on lines +76 to +92
# wait for new triton to be published
# Rename pytorch_triton package to triton
RUN if [ -f /etc/redhat-release ]; then \
echo "Rocky8 detected, skipping symlink and ldconfig steps"; \
else \
cd /usr/local/lib/python3.12/dist-packages/ && \
ls -la | grep pytorch_triton && \
mv pytorch_triton-3.3.1+gitc8757738.dist-info triton-3.3.1+gitc8757738.dist-info && \
cd triton-3.3.1+gitc8757738.dist-info && \
echo "Current directory: $(pwd)" && \
echo "Files in directory:" && \
ls -la && \
sed -i 's/^Name: pytorch-triton/Name: triton/' METADATA && \
sed -i 's|pytorch_triton-3.3.1+gitc8757738.dist-info/|triton-3.3.1+gitc8757738.dist-info/|g' RECORD && \
echo "METADATA after update:" && \
grep "^Name:" METADATA; \
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Avoid hardcoded version strings in PyTorch-Triton renaming.

The PyTorch-Triton package renaming logic contains hardcoded version strings (pytorch_triton-3.3.1+gitc8757738 and triton-3.3.1+gitc8757738) that will break when versions change.

Consider making this more maintainable:

 RUN if [ -f /etc/redhat-release ]; then \
         echo "Rocky8 detected, skipping symlink and ldconfig steps"; \
     else \
         cd /usr/local/lib/python3.12/dist-packages/ && \
-        ls -la | grep pytorch_triton && \
-        mv pytorch_triton-3.3.1+gitc8757738.dist-info triton-3.3.1+gitc8757738.dist-info && \
-        cd triton-3.3.1+gitc8757738.dist-info && \
+        PYTORCH_TRITON_DIR=$(ls -d pytorch_triton-*.dist-info | head -n 1) && \
+        TRITON_DIR=$(echo "$PYTORCH_TRITON_DIR" | sed 's/pytorch_triton/triton/') && \
+        mv "$PYTORCH_TRITON_DIR" "$TRITON_DIR" && \
+        cd "$TRITON_DIR" && \
         echo "Current directory: $(pwd)" && \
         echo "Files in directory:" && \
         ls -la && \
         sed -i 's/^Name: pytorch-triton/Name: triton/' METADATA && \
-        sed -i 's|pytorch_triton-3.3.1+gitc8757738.dist-info/|triton-3.3.1+gitc8757738.dist-info/|g' RECORD && \
+        sed -i "s|$PYTORCH_TRITON_DIR/|$TRITON_DIR/|g" RECORD && \
         echo "METADATA after update:" && \
         grep "^Name:" METADATA; \
     fi
📝 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
# wait for new triton to be published
# Rename pytorch_triton package to triton
RUN if [ -f /etc/redhat-release ]; then \
echo "Rocky8 detected, skipping symlink and ldconfig steps"; \
else \
cd /usr/local/lib/python3.12/dist-packages/ && \
ls -la | grep pytorch_triton && \
mv pytorch_triton-3.3.1+gitc8757738.dist-info triton-3.3.1+gitc8757738.dist-info && \
cd triton-3.3.1+gitc8757738.dist-info && \
echo "Current directory: $(pwd)" && \
echo "Files in directory:" && \
ls -la && \
sed -i 's/^Name: pytorch-triton/Name: triton/' METADATA && \
sed -i 's|pytorch_triton-3.3.1+gitc8757738.dist-info/|triton-3.3.1+gitc8757738.dist-info/|g' RECORD && \
echo "METADATA after update:" && \
grep "^Name:" METADATA; \
fi
# wait for new triton to be published
# Rename pytorch_triton package to triton
RUN if [ -f /etc/redhat-release ]; then \
echo "Rocky8 detected, skipping symlink and ldconfig steps"; \
else \
cd /usr/local/lib/python3.12/dist-packages/ && \
PYTORCH_TRITON_DIR=$(ls -d pytorch_triton-*.dist-info | head -n 1) && \
TRITON_DIR=$(echo "$PYTORCH_TRITON_DIR" | sed 's/pytorch_triton/triton/') && \
mv "$PYTORCH_TRITON_DIR" "$TRITON_DIR" && \
cd "$TRITON_DIR" && \
echo "Current directory: $(pwd)" && \
echo "Files in directory:" && \
ls -la && \
sed -i 's/^Name: pytorch-triton/Name: triton/' METADATA && \
sed -i "s|$PYTORCH_TRITON_DIR/|$TRITON_DIR/|g" RECORD && \
echo "METADATA after update:" && \
grep "^Name:" METADATA; \
fi
🤖 Prompt for AI Agents
In docker/Dockerfile.multi around lines 76 to 92, the renaming logic uses
hardcoded package version strings which will break when the triton package
version changes; instead, detect the actual dist-info directory name at runtime
(e.g., using a glob like pytorch_triton-*.dist-info), extract the version/name
components into variables, and perform mv, cd, and sed replacements using those
variables (update METADATA and RECORD using the discovered names rather than
literal strings); ensure the shell remains POSIX-safe in the Dockerfile RUN
(handle no-match cases robustly and keep the existing Rocky8 conditional).

Comment on lines +150 to +153
```{tip}
:name: build-from-source-tip-cuda-version
TensorRT LLM 1.1 supports both CUDA 12.9 and 13.0 while some dependency changes are required. The `requirements.txt` contains dependencies needed by CUDA 13.0. If you are using CUDA 12.9, please uncomment lines end with `# <For CUDA 12.9>` and comment out the next lines.
```
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Documentation inconsistent with automated CUDA version handling.

The documentation instructs users to manually uncomment/comment lines in requirements.txt for CUDA version selection. However, scripts/build_wheel.py (lines 950-981) now automatically modifies requirements.txt based on the CUDA_VERSION environment variable.

This creates confusion:

  • Should users manually edit the file?
  • Should they set the CUDA_VERSION environment variable instead?
  • If they do both, which takes precedence?

Update the documentation to clarify the recommended approach:

 ```{tip}
 :name: build-from-source-tip-cuda-version
-TensorRT LLM 1.1 supports both CUDA 12.9 and 13.0 while some dependency changes are required. The `requirements.txt` contains dependencies needed by CUDA 13.0. If you are using CUDA 12.9, please uncomment lines end with `# <For CUDA 12.9>` and comment out the next lines.
+TensorRT LLM 1.1 supports both CUDA 12.9 and 13.0 while some dependency changes are required. The `requirements.txt` contains dependencies for CUDA 13.0 by default. If you are using CUDA 12.9, the build script will automatically detect your CUDA version from the `CUDA_VERSION` environment variable and adjust dependencies accordingly. Alternatively, you can manually uncomment lines ending with `# <For CUDA 12.9>` and comment out the following lines before building.

<details>
<summary>🤖 Prompt for AI Agents</summary>

In docs/source/installation/build-from-source-linux.md around lines 150 to 153,
the doc currently tells users to manually edit requirements.txt for CUDA 12.9
but the build script (scripts/build_wheel.py lines 950-981) automatically
adjusts requirements based on the CUDA_VERSION env var; update the tip to state
that requirements.txt defaults to CUDA 13.0, the build script will automatically
detect and switch dependencies when CUDA_VERSION is set to 12.9, and also note
users may alternatively perform the manual uncomment/comment edits if they
prefer—clarify precedence (environment variable/build script takes precedence
over manual edits during automated build) and give a concise recommended action:
set CUDA_VERSION for automated builds or edit requirements.txt for manual
control.


</details>

<!-- This is an auto-generated comment by CodeRabbit -->

Comment on lines +21 to +22
# Optional step: Only required for NVIDIA Blackwell GPUs and SBSA platform
pip3 install torch==2.7.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Clarify PyTorch and CUDA version references.

The documentation mentions:

  • Line 22: Installing torch==2.7.1 with cu128 wheels
  • Line 17: TensorRT LLM 1.1 supports CUDA 12.9 and 13.0
  • Line 30: PyTorch CUDA 12.8 package is required

Please clarify:

  1. The relationship between cu128 (CUDA 12.8) and the CUDA 12.9 support mentioned in the tip
  2. Whether PyTorch 2.7.1 is the correct version (the AI summary mentions PyTorch 2.8.0)

🌐 Web query:

What is the latest PyTorch version that supports CUDA 12.8 (cu128)?

💡 Result:

The latest stable PyTorch release with official CUDA 12.8 (cu128) binaries is PyTorch 2.7 (2.7.x). [1][2][3]

Sources:

  • Google Cloud Deep Learning VM images (lists PyTorch 2.7.1 with CUDA 12.8). [1]
  • NVIDIA PyTorch release notes (container based on 2.7.0 and CUDA 12.8). [2]
  • PyTorch GitHub / issue discussion showing 2.7+cu128 builds. [3]





🌐 Web query:

TensorRT-LLM 1.1 CUDA version support requirements

💡 Result:

TensorRT‑LLM 1.1 supports CUDA 12.9 and CUDA 13.0. The prebuilt Python wheel release only supports CUDA 12.9; CUDA 13.0 is supported via the NGC container or when building from source with the CUDA‑13 dependencies. [1][2]

Sources:

  • NVIDIA TensorRT‑LLM installation (pip) — note about CUDA 12.9 vs 13.0. [1]
  • TensorRT‑LLM build-from-source — instructions/notes for supporting CUDA 12.9 and 13.0. [2]

🌐 Web query:

TensorRT-LLM 1.1 CUDA version support

💡 Result:

TensorRT-LLM 1.1 supports CUDA 12.9 and CUDA 13.0. The prebuilt pip wheel release only supports CUDA 12.9; CUDA 13.0 is supported via the NGC container or when building from source with the CUDA‑13 dependencies. [1][2]

Sources:
[1] NVIDIA TensorRT‑LLM installation (pip) — notes on CUDA 12.9 and 13.0 support.
[2] NVIDIA TensorRT‑LLM build-from-source — instructions and dependency differences for CUDA 12.9 vs 13.0.


CUDA version mismatch: PyTorch wheels use CUDA 12.8, but TensorRT-LLM 1.1 requires CUDA 12.9.

The documentation instructs installing torch==2.7.1 with cu128 wheels (CUDA 12.8), but TensorRT-LLM 1.1 only supports CUDA 12.9 and 13.0. This incompatibility needs to be resolved:

  • Use cu129 wheels (CUDA 12.9) instead of cu128, or
  • Update the documentation to clarify which CUDA versions are compatible with TensorRT-LLM 1.1
🤖 Prompt for AI Agents
In docs/source/installation/linux.md around lines 21 to 22, the guide installs
torch==2.7.1 using cu128 (CUDA 12.8) which is incompatible with TensorRT-LLM 1.1
that requires CUDA 12.9 or 13.0; change the pip install to use the cu129 wheels
(or explicitly document supported CUDA versions) by replacing the index-url or
wheel tag to cu129 and add a short note stating TensorRT-LLM 1.1 requires CUDA
12.9/13.0 so users must match PyTorch CUDA builds accordingly.

Comment on lines +457 to +459
if (tarName.contains("CU12")) {
trtllm_utils.llmExecStepWithRetry(pipeline, script: "cd ${LLM_ROOT} && sed -i '/^# .*<For CUDA 12\\.9>\$/ {s/^# //; n; s/^/# /}' requirements.txt && cat requirements.txt")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Keep the CUDA 12.9 marker commented and un-comment only the dependency

This sed now strips the leading “# ” from the <For CUDA 12.9> marker and then re-comments the actual requirement line. During CU12 builds/tests pip3 install -r requirements*.txt encounters the bare <For CUDA 12.9> token and aborts with “Invalid requirement”, so the entire job fails. Please leave the marker commented and only un-comment the dependency line itself.

-        trtllm_utils.llmExecStepWithRetry(pipeline, script: "cd ${LLM_ROOT} && sed -i '/^# .*<For CUDA 12\\.9>\$/ {s/^# //; n; s/^/# /}' requirements.txt && cat requirements.txt")
+        trtllm_utils.llmExecStepWithRetry(pipeline, script: "cd ${LLM_ROOT} && sed -i '/^# .*<For CUDA 12\\.9>\$/ {n; s/^# //}' requirements.txt && cat requirements.txt")
🤖 Prompt for AI Agents
jenkins/Build.groovy lines 457-459: the sed currently un-comments the "<For CUDA
12.9>" marker and re-comments the dependency, causing pip to see the bare marker
and fail; change the sed invocation so it does NOT modify the marker line but
instead, when it finds a commented "<For CUDA 12.9>" marker, moves to the next
line and removes the leading "# " only from that following dependency line
(leave the marker commented), then verify by printing requirements.txt.

Comment on lines +2092 to 2094
trtllm_utils.llmExecStepWithRetry(pipeline, script: "cd ${llmSrc} && sed -i '/^# .*<For CUDA 12\\.9>\$/ {s/^# //; n; s/^/# /}' requirements.txt && cat requirements.txt")
}
trtllm_utils.llmExecStepWithRetry(pipeline, script: "cd ${llmSrc} && pip3 install --retries 1 -r requirements-dev.txt")
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Same sed issue makes CU12 test environments uninstallable

The CU12 path flips the comment markers exactly like in Build.groovy: it exposes the <For CUDA 12.9> sentinel while double-commenting the dependency line, so pip3 install -r requirements*.txt fails immediately when CU12 tests run.

Please update this sed (and the matching ones at Line 2390 and Line 2968) to keep the marker commented and only un-comment the dependency:

-            trtllm_utils.llmExecStepWithRetry(pipeline, script: "cd ${llmSrc} && sed -i '/^# .*<For CUDA 12\\.9>\$/ {s/^# //; n; s/^/# /}' requirements.txt && cat requirements.txt")
+            trtllm_utils.llmExecStepWithRetry(pipeline, script: "cd ${llmSrc} && sed -i '/^# .*<For CUDA 12\\.9>\$/ {n; s/^# //}' requirements.txt && cat requirements.txt")

Apply the same fix where we touch ${tensorrt_llm}/requirements.txt and ${LLM_ROOT}/requirements.txt for CU12.

🤖 Prompt for AI Agents
In jenkins/L0_Test.groovy around lines 2092-2094, the sed command currently
un-comments the sentinel line "<For CUDA 12.9>" and double-comments the
dependency line, breaking pip installs; change the sed invocation so it leaves
the sentinel line commented and only removes the leading comment from the
dependency line immediately after the sentinel (i.e., match the commented
sentinel but only strip the "# " from the subsequent line), and apply the
identical change to the matching sed invocations at lines ~2390 and ~2968 and to
the sed calls that operate on ${tensorrt_llm}/requirements.txt and
${LLM_ROOT}/requirements.txt so the marker remains commented and only the
dependency is un-commented.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #23992 [ run ] completed with state FAILURE. Commit: 94c150a
/LLM/main/L0_MergeRequest_PR pipeline #18069 (Partly Tested) completed with status: 'FAILURE'

@ZhanruiSunCh
Copy link
Collaborator Author

/bot run --stage-list "Build-Docker-Images"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24012 [ run ] triggered by Bot. Commit: 94c150a

Signed-off-by: ZhanruiSunCh <184402041+ZhanruiSunCh@users.noreply.github.com>
@ZhanruiSunCh
Copy link
Collaborator Author

/bot run --disable-fail-fast --post-merge

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24018 [ run ] triggered by Bot. Commit: 2c03b2a

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24012 [ run ] completed with state ABORTED. Commit: 94c150a
LLM/main/L0_MergeRequest_PR #18089 (Blue Ocean) completed with status: ABORTED

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24018 [ run ] completed with state SUCCESS. Commit: 2c03b2a
/LLM/main/L0_MergeRequest_PR pipeline #18094 completed with status: 'FAILURE'

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