From 07b7d0ceaaa2fc86728184feccde34de00417386 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 18 Jan 2024 11:53:49 -0500 Subject: CUDA/Clang: Update architectures supported by CUDA 12 In commit 4d90f65b24 (CUDA: Update set of architectures supported by CUDA 12, 2022-12-19, v3.26.0-rc1~120^2) we incorrectly guarded dropping removed architectures by compiler id, but it is actually the CUDA 12 toolkit itself that removed support. --- Modules/Internal/CMakeCUDAArchitecturesAll.cmake | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Modules/Internal/CMakeCUDAArchitecturesAll.cmake b/Modules/Internal/CMakeCUDAArchitecturesAll.cmake index 873400a..e0fdb67 100644 --- a/Modules/Internal/CMakeCUDAArchitecturesAll.cmake +++ b/Modules/Internal/CMakeCUDAArchitecturesAll.cmake @@ -68,10 +68,8 @@ function(cmake_cuda_architectures_all lang lang_var_) endif() if(${lang_var_}TOOLKIT_VERSION VERSION_GREATER_EQUAL 12.0) - if(CMAKE_${lang}_COMPILER_ID STREQUAL "NVIDIA") - list(REMOVE_ITEM CMAKE_CUDA_ARCHITECTURES_ALL 35 37) - list(REMOVE_ITEM CMAKE_CUDA_ARCHITECTURES_ALL_MAJOR 35) - endif() + list(REMOVE_ITEM CMAKE_CUDA_ARCHITECTURES_ALL 35 37) + list(REMOVE_ITEM CMAKE_CUDA_ARCHITECTURES_ALL_MAJOR 35) endif() # only generate jit code for the newest arch for all/all-major -- cgit v0.12 From 6251edc5a42be2d1ae8494ed45cc28cb321ce509 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 18 Jan 2024 12:24:48 -0500 Subject: CUDA/Clang: Record architectures supported by Clang 16 --- Modules/Internal/CMakeCUDAArchitecturesAll.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Modules/Internal/CMakeCUDAArchitecturesAll.cmake b/Modules/Internal/CMakeCUDAArchitecturesAll.cmake index e0fdb67..c588dfb 100644 --- a/Modules/Internal/CMakeCUDAArchitecturesAll.cmake +++ b/Modules/Internal/CMakeCUDAArchitecturesAll.cmake @@ -55,13 +55,17 @@ function(cmake_cuda_architectures_all lang lang_var_) endif() if(${lang_var_}TOOLKIT_VERSION VERSION_GREATER_EQUAL 11.4) - if(CMAKE_${lang}_COMPILER_ID STREQUAL "NVIDIA") + if(CMAKE_${lang}_COMPILER_ID STREQUAL "NVIDIA" + OR (CMAKE_${lang}_COMPILER_ID STREQUAL "Clang" AND CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0) + ) list(APPEND CMAKE_CUDA_ARCHITECTURES_ALL 87) endif() endif() if(${lang_var_}TOOLKIT_VERSION VERSION_GREATER_EQUAL 11.8) - if(CMAKE_${lang}_COMPILER_ID STREQUAL "NVIDIA") + if(CMAKE_${lang}_COMPILER_ID STREQUAL "NVIDIA" + OR (CMAKE_${lang}_COMPILER_ID STREQUAL "Clang" AND CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0) + ) list(APPEND CMAKE_CUDA_ARCHITECTURES_ALL 89 90) list(APPEND CMAKE_CUDA_ARCHITECTURES_ALL_MAJOR 90) endif() -- cgit v0.12