TensorRT-LLM icon indicating copy to clipboard operation
TensorRT-LLM copied to clipboard

[bug]: SM 120 (Blackwell) Dependency Regression and Kernel Occupancy Warnings in 1.3.0rc2

Open CristyNel opened this issue 9 months ago • 3 comments

System Info

  • GPU: NVIDIA GeForce RTX 5090 Blackwell (SM 120)
  • CPU: Intel i9-14900K Raptor Lake-S Refresh (32) @ 5.700GHz
  • RAM: TeamGroup Delta RGB 64GB DDR5-7600 7600MHz Dual Channel
  • OS: Ubuntu 24.04.3 LTS x86_64
  • Kernel: 6.14.0-37-generic
  • Docker Image: nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc2
  • Python Version: 3.12.3
  • CUDA Version: 12.8

Who can help?

Information

  • [x] The official example scripts
  • [ ] My own modified scripts

Tasks

  • [x] An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • [ ] My own task or dataset (give details below)

Steps to reproduce the behavior:

  1. Start the official 1.3.0rc2 container
docker run --rm -it --ipc=host --gpus all \
nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc2 bash
  1. Navigate to the source directory
cd /code/tensorrt_llm
  1. Set debug mode and attempt build for SM 120 (Blackwell)
export TLLM_DEBUG_MODE=1
python3 ./scripts/build_wheel.py --cuda_architectures 120a

Expected behavior

The build process for TensorRT-LLM 1.3.0rc2 on SM 120 (Blackwell) should be a streamlined experience that honors the local environment and new hardware.

  • Pre-aligned Dependencies: The release container should have all core packages (e.g., urllib3, typing-extensions) pre-synced to avoid recursive redownload loops during the build.
  • Functional Build Toggles: The script should provide a working flag (e.g., --skip_pip_install) or honor an environment variable to bypass Pip checks in pre-configured or air-gapped environments.
  • Blackwell-Optimized Kernels: Kernel occupancy hints (__launch_bounds__) should be updated for SM 120 so the compiler doesn't ignore "out of range" directives meant for older architectures.
  • Clean Logs: Harmless template-expansion warnings should be suppressed via CMake diagnostics or [[maybe_unused]] attributes to keep logs clear and prevent terminal I/O bottlenecks.

Example Output

A successful build should skip the "Collecting..." phase and proceed directly to compilation:

[Step 1] Checking Dependencies... Requirement already satisfied.
[Step 2] Configuring CMake for SM 120 (Blackwell)...
[Step 3] Starting Compilation...
[1/1040] Building NVCC object kernels/quantization.cu.o
...
Build Succeeded.

Actual Behavior

The software fails to maintain a stable build environment, resulting in recursive dependency downloads and sub-optimal kernel compilation for the Blackwell architecture.

  • Recursive Dependency Loop: The build script identifies version mismatches between the container's pre-installed packages and requirements-dev.txt (e.g., typing-extensions 4.12.2 vs. required 4.14.0+), triggering external pip downloads that cannot be bypassed via standard flags.
  • SM 120 Instruction Mismatch: During the ptxas phase, the compiler explicitly ignores hardcoded occupancy hints (.minnctapersm), citing them as "out of range" for the SM 120 architecture.
  • Log Pollution: The build produces thousands of repetitive #177-D and %zu format warnings during template expansion, which increases terminal I/O overhead and obscures critical build errors.

Example Output

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed.
tensorrt-llm 1.3.0rc2 requires urllib3>=2.6.3, but you have urllib3 2.0.7 which is incompatible.

[73/1040] Building NVCC object kernels/quantization.cu.o
ptxas warning : Value of threads per SM for entry ... is out of range. .minnctapersm will be ignored

../tensorrt_llm/kernels/helixKernels.cu(236): warning #177-D: variable "num_tokens" was declared but never referenced

Additional Notes

  • SM 120 Maturity: These issues appear to be regressions or missing optimizations specifically for the Blackwell (SM 120) architecture in the 1.3.0rc2 release candidate branch.
  • Build Performance: The frequent re-evaluation of template-heavy headers and the compiler ignoring "out-of-range" occupancy hints significantly extends build times on high-end hardware like the RTX 5090.
  • Environment Parity: The lack of a working --skip_pip_install flag in this branch makes it impossible to maintain a "frozen" professional environment, forcing manual workarounds (like export TRT_LLM_SKIP_PIP_INSTALL=1) that should ideally be handled by the build script itself.
  • Debug Mode: Full logs were generated with TLLM_DEBUG_MODE=1. These reveal that while the C++ compilation eventually succeeds, the resulting Python environment is left in a "broken" state due to the unresolved typing-extensions and urllib3 conflicts.

Before submitting a new issue...

  • [x] Make sure you already searched for relevant issues, and checked the documentation and examples for answers to frequently asked questions.

CristyNel avatar Feb 09 '26 12:02 CristyNel

@yiqingy0, could you please take a look at this issue or assign it to someone? I would greatly appreciate it.

karljang avatar Feb 11 '26 20:02 karljang

@CristyNel May I ask where the /code/tensorrt_llm folder came from?

yiqingy0 avatar Feb 12 '26 03:02 yiqingy0

Container image: nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc3

problem :

PyTorch in the container is built for CUDA 13.1 (torch.version.cuda: 13.1; nvidia-smi shows CUDA Version: 13.1). TRT‑LLM native plugins in this image require PyTorch built for CUDA 12.x. Evidence: log line "CUDA 13 is not currently supported for TRT-LLM plugins. Please install pytorch with CUDA 12.x support" and tensorrt_llm v1.3.0rc3 present. Consequence:

TRT‑LLM plugins will not load; packing/engine build will fail.

CristyNel avatar Feb 18 '26 00:02 CristyNel