Skip to content

Commit c2edc96

Browse files
authored
Update CUDA arches for CUDA 11.8 / sm_90 support.
1 parent 1c7f899 commit c2edc96

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

recipe/build-lib.sh

+15-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,21 @@ if [ ${cuda_compiler_version} != "None" ]; then
1111
# docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#ptxas-options-gpu-name
1212
# docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#gpu-feature-list
1313

14-
# the following are all the x86-relevant gpu arches; for building aarch64-packages, add: 53, 62, 72
15-
ARCHES=(52 60 61 70)
16-
if [ $(version2int $cuda_compiler_version) -ge $(version2int "11.1") ]; then
14+
15+
if [ "$(uname -m)" = "aarch64" ]; then
16+
# For building aarch64-packages, add arches 53, 62, 72
17+
ARCHES=(52 53 60 61 62 70 72)
18+
else
19+
# Architectures for x86_64
20+
ARCHES=(52 60 61 70)
21+
fi
22+
23+
if [ $(version2int $cuda_compiler_version) -ge $(version2int "11.8") ]; then
24+
# Hopper support for H100 (sm_90) needs cuda >= 11.8
25+
LATEST_ARCH=90
26+
# ARCHES does not contain LATEST_ARCH; see usage below
27+
ARCHES=( "${ARCHES[@]}" 75 80 86)
28+
elif [ $(version2int $cuda_compiler_version) -ge $(version2int "11.1") ]; then
1729
# Ampere support for GeForce 30 (sm_86) needs cuda >= 11.1
1830
LATEST_ARCH=86
1931
# ARCHES does not contain LATEST_ARCH; see usage below

0 commit comments

Comments
 (0)