Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
COMP: Initialize list of CUDA architectures for maximum compatibility
To support building on system without the most recent 11.x toolkit, we specify 80 as upper bound. The changes leverage the following key features introduced in various CMake versions: * 3.18: A CMAKE_CUDA_ARCHITECTURES variable was added to specify CUDA output architectures. See https://cmake.org/cmake/help/latest/release/3.18.html#variables and https://cmake.org/cmake/help/latest/policy/CMP0104.html#policy:CMP0104 * 3.19: If CUDA compiler detection fails with user-specified CMAKE_CUDA_ARCHITECTURES or CMAKE_CUDA_HOST_COMPILER, an error is raised. See https://cmake.org/cmake/help/latest/release/3.19.html#other-changes * 3.20: The CUDAARCHS environment variable was added for initializing CMAKE_CUDA_ARCHITECTURES. Useful in cases where the compiler default is unsuitable for the machine's GPU. See https://cmake.org/cmake/help/latest/release/3.20.html#languages * 3.23: The CMAKE_CUDA_ARCHITECTURES variable and associated CUDA_ARCHITECTURES target property now support the all, and all-major values for CUDA toolkit 7.0+. See https://cmake.org/cmake/help/latest/release/3.23.html#variables References: * https://docs.nvidia.com/cuda/archive/11.8.0/cuda-c-best-practices-guide/index.html#building-for-maximum-compatibility * https://forums.developer.nvidia.com/t/how-should-i-use-correctly-the-sm-xx-and-compute-xx/219160 * https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/
- Loading branch information