Skip to content

Commit e4a9a94

Browse files
Update build-cuda.sh
1 parent 12cc3fb commit e4a9a94

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/scripts/build-cuda.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@ declare build_os
44
declare cuda_version
55

66
set -xeuo pipefail
7-
build_capability="50;52;60;61;70;75;80;86;89;90;100;120"
8-
remove_for_11_7=";89;90;100;120"
9-
remove_for_11_8=";100;120"
10-
remove_for_lt_12_7=";100;120"
11-
[[ "${cuda_version}" == 11.7.* ]] && build_capability=$(sed 's|'"$remove_for_11_7"'||g' <<< "$build_capability")
12-
[[ "${cuda_version}" == 11.8.* ]] && build_capability=$(sed 's|'"$remove_for_11_8"'||g' <<< "$build_capability")
13-
[[ "${cuda_version}" < 12.7 ]] && build_capability=$(sed 's|'"$remove_for_lt_12_7"'||g; s|'"${remove_for_lt_12_7#;}"';||g' <<< "$build_capability")
7+
8+
# By default, target Maxwell through Hopper.
9+
build_capability = "50;52;60;61;70;75;80;86;89;90"
10+
11+
# CUDA 11.7: Remove sm89 and sm90
12+
[[ "${cuda_version}" == 11.7.* ]] && build_capability="50;52;60;61;70;75;80;86"
13+
14+
# CUDA 12.8: Add sm100 and sm120; remove sm50 through sm61
15+
[[ "${cuda_version}" == 12.8.* ]] && build_capability="70;75;80;86;89;90;100;120"
16+
1417
[[ "${build_os}" = windows-* ]] && python3 -m pip install ninja
1518

1619
if [ "${build_os:0:6}" == ubuntu ]; then

0 commit comments

Comments
 (0)