CUDA: Value of CMAKE_CUDA_ARCHITECTURES_{ALL,ALL_MAJOR} in CUDA 11.5+
As of CMake 3.23.0-rc2, we populate CMAKE_CUDA_ARCHITECTURES_ALL
and CMAKE_CUDA_ARCHITECTURES_ALL_MAJOR
using a memorized table based on CUDA toolkit versions. When using CUDA 11.5+, nvcc provides -arch={all,all-major}
, and we don't need the values of CMAKE_CUDA_ARCHITECTURES_{ALL,ALL_MAJOR}
. However, we still populate them. Although undocumented, projects might try to use them for something, and later expect values to be up to date in future CUDA toolkit versions. Also, we need the memorized table currently for Clang support even with CUDA 11.5+ toolkits.
I don't think we should forever maintain the memorized list of all architectures for future toolkit versions. Might we be able to detect them from the output of nvcc -arch=all
?