Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cpp/cmake/modules/cuda_configuration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Functions

``all`` or unset
Resolves to architectures TensorRT-LLM is optimized for and the
compiler supports (80, 86, 89, 90, 100, 103, 120 depending on CUDA version).
compiler supports (80, 86, 89, 90, 100, 103, 107, 120 depending on CUDA version).

``all-major``
Unsupported. Results in a fatal error.
Expand Down Expand Up @@ -341,6 +341,9 @@ function(setup_cuda_architectures)
if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "12.9")
list(APPEND CMAKE_CUDA_ARCHITECTURES_RAW 103)
endif()
if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "13.4")
list(APPEND CMAKE_CUDA_ARCHITECTURES_RAW 107)
endif()
endif()

# CMAKE_CUDA_ARCHITECTURES_ORIG contains all architectures enabled, without
Expand Down Expand Up @@ -431,6 +434,7 @@ function(setup_cuda_architectures)
90
100
103
107
120)
foreach(CUDA_ARCH IN LISTS ARCHITECTURES_WITH_KERNELS)
if(NOT ${CUDA_ARCH} IN_LIST CMAKE_CUDA_ARCHITECTURES_ORIG)
Expand Down
8 changes: 5 additions & 3 deletions cpp/include/tensorrt_llm/common/cudaUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,12 @@ inline int getSMVersion(bool queryRealSmArch = false)
return sm;
}

inline bool isSM100Family()
inline bool isSM100Family(std::optional<int> sm = std::nullopt)
{
int const sm = getSMVersion();
return sm == 100 || sm == 103; // To be continued...
// Not value_or(): its argument is evaluated eagerly, so an explicit sm
// would still trigger a device query (which throws with no device present).
int smVersion = sm.has_value() ? *sm : getSMVersion();
return smVersion >= 100 && smVersion < 110;
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}

inline int getDevice()
Expand Down
2 changes: 1 addition & 1 deletion tensorrt_llm/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ def get_sm_version():
def is_sm_100f(sm_version=None):
if sm_version is None:
sm_version = get_sm_version()
return sm_version == 100 or sm_version == 103
return sm_version >= 100 and sm_version < 110


@lru_cache(maxsize=1)
Expand Down
12 changes: 11 additions & 1 deletion tests/integration/defs/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1585,7 +1585,7 @@ def get_sm_version():
def is_sm_100f(sm_version=None):
if sm_version is None:
sm_version = get_sm_version()
return sm_version == 100 or sm_version == 103
return sm_version >= 100 and sm_version < 110


def get_gpu_device_list():
Expand Down Expand Up @@ -1641,11 +1641,21 @@ def is_ipc_nvls_supported():
reason="This test is not supported in post-Blackwell architecture",
)

skip_no_rubin = pytest.mark.skipif(
get_sm_version() != 107,
reason="This test is only supported in Rubin architecture",
)

skip_post_blackwell_ultra = pytest.mark.skipif(
get_sm_version() >= 103,
reason="This test is not supported in post-Blackwell-Ultra architecture",
)

skip_pre_rubin = pytest.mark.skipif(
get_sm_version() < 107,
reason="This test is not supported in pre-Rubin architecture",
)

skip_device_contain_gb200 = pytest.mark.skipif(
check_device_contain(["GB200"]),
reason="This test is not supported on GB200 or GB100",
Expand Down
Loading