Skip to content

CUDA: Update set of architectures supported by CUDA 12

Xin Yao requested to merge yaoxin/cmake:update_cuda into master

For Modules/CUDA/architectures.cmake:

  1. 21 is not in CMAKE_CUDA_ARCHITECTURES_ALL_MAJOR so there is no need to remove.
  2. Remove 35 and 37 for CUDA 12.
Changes to `Modules/FindCUDA/select_compute_arch.cmake` are reverted and may be in another PR.

For Modules/FindCUDA/select_compute_arch.cmake:

  1. IIUC, in CMAKE, CUDA_COMMON_GPU_ARCHITECTURES = GeForce+Quadro+Tesla, and CUDA_ALL_GPU_ARCHITECTURES = CUDA_COMMON_GPU_ARCHITECTURES + Tegra, so 5.2 (not 5.3) should be in "common".
  2. The inclusion of SM50 on the list to deprecate was a mistake and has been fixed in CUDA 11.6. So I revert removing it from "common".
  3. Add 8.7 to "all" for CUDA >= 11.4.
  4. Add Ada(8.9) and Hopper(9.0) to both "common" and "all" for CUDA >= 11.8.
  5. Remove Kepler/Kepler+Tegra/Kepler+Tesla from "known" and 3.5/3.7 from "all" for CUDA >= 12.0.
  6. To be more accurate, use CUDA_ALL_GPU_ARCHITECTURES, instead of CUDA_KNOWN_GPU_ARCHITECTURES, for the "All" option.
  7. Remove CUDA_KNOWN_GPU_ARCHITECTURES.
    • It's more close to "common", for example, 6.2, 7.2, and 8.7 are missing in it.
    • It's hard to parse "Ampere" to concrete gencodes (sm80/sm86/sm87) except by adding something like Ampere+RTX and Ampere+Tegra.
    • Passing names to CUDA_SELECT_NVCC_ARCH_FLAGS() manually is still allowed.

Topic-rename: cuda-12

Edited by Brad King

Merge request reports