From 65642c73089c9a06946e10f521a6d7acca2cc4cb Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 1 Sep 2023 16:21:31 -0500 Subject: [PATCH] [libc][NFC] Support sm_89 and sm_90 NVIDIA GPUs Summary: These architectures were left out from the list and should be supported. --- libc/cmake/modules/LLVMLibCObjectRules.cmake | 4 ++++ libc/cmake/modules/prepare_libc_gpu_build.cmake | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake index a54251d95867..fa450dade92f 100644 --- a/libc/cmake/modules/LLVMLibCObjectRules.cmake +++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake @@ -109,6 +109,10 @@ function(get_nvptx_compile_options output_var gpu_arch) list(APPEND nvptx_options "--cuda-feature=+ptx72") elseif(${gpu_arch} STREQUAL "sm_86") list(APPEND nvptx_options "--cuda-feature=+ptx72") + elseif(${gpu_arch} STREQUAL "sm_89") + list(APPEND nvptx_options "--cuda-feature=+ptx72") + elseif(${gpu_arch} STREQUAL "sm_90") + list(APPEND nvptx_options "--cuda-feature=+ptx72") else() message(FATAL_ERROR "Unknown Nvidia GPU architecture '${gpu_arch}'") endif() diff --git a/libc/cmake/modules/prepare_libc_gpu_build.cmake b/libc/cmake/modules/prepare_libc_gpu_build.cmake index 5bf1fc07c8a6..063c3b3ca650 100644 --- a/libc/cmake/modules/prepare_libc_gpu_build.cmake +++ b/libc/cmake/modules/prepare_libc_gpu_build.cmake @@ -9,7 +9,7 @@ set(all_amdgpu_architectures "gfx700;gfx701;gfx801;gfx803;gfx900;gfx902;gfx906" "gfx1031;gfx1032;gfx1033;gfx1034;gfx1035;gfx1036" "gfx1100;gfx1101;gfx1102;gfx1103;gfx1150;gfx1151") set(all_nvptx_architectures "sm_35;sm_37;sm_50;sm_52;sm_53;sm_60;sm_61;sm_62" - "sm_70;sm_72;sm_75;sm_80;sm_86") + "sm_70;sm_72;sm_75;sm_80;sm_86;sm_89;sm_90") set(all_gpu_architectures "${all_amdgpu_architectures};${all_nvptx_architectures}") set(LIBC_GPU_ARCHITECTURES "all" CACHE STRING