Skip to content

Commit c97fa6f

Browse files
committed
Partial revert of "CUDA: build for host architecture by default."
This partially reverts commit a4c35e5, tested with CUDA 12.8, but which caused issues with older nvcc compilers.
1 parent 6f85658 commit c97fa6f

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

m4/cs_cuda.m4

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,17 @@ if test "x$cs_have_cuda" != "xno" ; then
6262
CUDA_LIBS+=" -lcudart"
6363
6464
# Try to detect available architectures.
65-
# As of 2025, we do not care to support CUDA versions older than 11
66-
# (and even then, target machines should be at least Volta, though
65+
# As of 2024, we do not care to support CUDA versions older than 11
66+
# (and even then,target machines should be at least Volta, though
6767
# developping/debugging on local machines using older hardware remains useful).
6868
69-
AC_ARG_VAR([CUDA_ARCH_NUM], [Build for specified CUDA archtectures (example:
70-
CUDA_ARCH_NUM="60 62 70 72 75 80 86").
71-
Must be specified when compiling for CUDA on node with no GPU.])
69+
if test "$CUDA_ARCH_NUM" = ""; then
70+
# CUDA_ARCH_NUM="60 61 62 70 72 75 80 86"
71+
CUDA_ARCH_NUM="70 80"
72+
fi
7273
7374
user_nvccflags="${NVCCFLAGS}"
7475
75-
# CUDA architectures to build for
76-
7776
if test "$CUDA_ARCH_NUM" != ""; then
7877
touch conftest.cu
7978
for cu_arch in $CUDA_ARCH_NUM; do
@@ -83,8 +82,6 @@ if test "x$cs_have_cuda" != "xno" ; then
8382
fi
8483
done
8584
rm -f conftest.cu conftest.o
86-
else
87-
NVCCFLAGS="${NVCCFLAGS} --gpu-architecture=native"
8885
fi
8986
9087
NVCCFLAGS="${NVCCFLAGS} -Xptxas -v"

0 commit comments

Comments
 (0)