A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 08:30 UTC
[Bugfix][Build/CI] Fixup CUDA compiler version check for CUDA_SUPPORTED_ARCHS (#18579)
Simon Mo committed
May 23, 2025 at 07:43 UTC
1068556b2ca6c136000fa48db7d62ce1b5250dea
1 file changed
+9
-7
CMakeLists.txt
+9
-7
@@ -29,13 +29,6 @@ set(ignoreMe "${VLLM_PYTHON_PATH}")
29
#
30
set(PYTHON_SUPPORTED_VERSIONS "3.9" "3.10" "3.11" "3.12")
31
32
-# Supported NVIDIA architectures.
33
-if(${CMAKE_CUDA_COMPILER_VERSION} VERSION_GREATER_EQUAL)
34
- set(CUDA_SUPPORTED_ARCHS "7.0;7.2;7.5;8.0;8.6;8.7;8.9;9.0;10.0;10.1;12.0")
35
-else()
36
- set(CUDA_SUPPORTED_ARCHS "7.0;7.2;7.5;8.0;8.6;8.7;8.9;9.0")
37
-endif()
38
-
32
# Supported AMD GPU architectures.
33
set(HIP_SUPPORTED_ARCHS "gfx906;gfx908;gfx90a;gfx942;gfx950;gfx1030;gfx1100;gfx1101;gfx1200;gfx1201")
34
@@ -83,6 +76,15 @@ endif()
76
#
77
find_package(Torch REQUIRED)
78
79
+# Supported NVIDIA architectures.
80
+# This check must happen after find_package(Torch) because that's when CMAKE_CUDA_COMPILER_VERSION gets defined
81
+if(DEFINED CMAKE_CUDA_COMPILER_VERSION AND
82
+ CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 12.8)
83
+ set(CUDA_SUPPORTED_ARCHS "7.0;7.2;7.5;8.0;8.6;8.7;8.9;9.0;10.0;10.1;12.0")
84
+else()
85
+ set(CUDA_SUPPORTED_ARCHS "7.0;7.2;7.5;8.0;8.6;8.7;8.9;9.0")
86
+endif()
87
+
88
#
89
# Forward the non-CUDA device extensions to external CMake scripts.
90
#