Skip to content

Build failure on CUDA < 12.8 due to ungated default CMAKE_CUDA_ARCHITECTURES containing SM 100/120 #4887

Open

Description

@Deeven-Seru

Description

In the TensorRT 11.4 OSS release (#4872), CMAKE_CUDA_ARCHITECTURES was defaulted to include SM 100 and SM 120:

if (NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
  set(CMAKE_CUDA_ARCHITECTURES 75 80 86 89 90 100 120)
  set(_TRT_CUDA_ARCHS_DEFAULTED TRUE)
endif()

While SM 110 (Thor) is conditionally appended only when CUDAToolkit_VERSION VERSION_GREATER_EQUAL "13.0":

if (_TRT_CUDA_ARCHS_DEFAULTED AND CUDAToolkit_VERSION VERSION_GREATER_EQUAL "13.0")
  list(APPEND CMAKE_CUDA_ARCHITECTURES 110)
endif()

SM 100 and SM 120 (Blackwell) require CUDA 12.8+ to be compiled with nvcc. When building TensorRT OSS components with CUDA 12.0 - 12.6, CMake passes -gencode arch=compute_100,code=sm_100 and -gencode arch=compute_120,code=sm_120 to nvcc, which immediately fails with:

nvcc fatal : Value 'sm_100' is not defined for option 'gpu-architecture'

TensorRT's own plugin headers recognize this requirement (#if CUDA_VERSION >= 12080 in fused_multihead_attention_v2.h:1148).

Additionally, in samples/python/plugin_utils.py:77, use_cubin checks nvrtc_minor >= 1. Under CUDA 12.0 or 13.0 where nvrtc_minor is 0, this evaluates to false and incorrectly disables CUBIN generation, falling back to PTX JIT compilation.

Environment

TensorRT Version: 11.4.0.106 / main
CUDA Version: < 12.8 (e.g. 12.0 - 12.6)
Operating System: Linux / x86_64

Steps To Reproduce

  1. Install CUDA 12.6 or earlier (e.g. CUDA 12.4).
  2. Configure TensorRT OSS build:
    cmake -B build
  3. Run build:
    cmake --build build
  4. Build fails with nvcc fatal : Value 'sm_100' is not defined for option 'gpu-architecture'.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Module:OSS BuildBuilding issues: cmake, make, pip install, etc.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions