Author: Joseph Huber Date: 2023-08-02T17:30:23-05:00 New Revision: ab202aa7004a451ee9f496505256cfcb94d71747
URL: https://github.com/llvm/llvm-project/commit/ab202aa7004a451ee9f496505256cfcb94d71747 DIFF: https://github.com/llvm/llvm-project/commit/ab202aa7004a451ee9f496505256cfcb94d71747.diff LOG: [Clang] Increase default architecture from sm_35 to sm_52 We previously defaulted to `sm_35` for the purpose of unspecified architecture. This was removed in new CUDA versions so we should bump this up. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D156936 Added: Modified: clang/include/clang/Basic/Cuda.h clang/test/Driver/cuda-cross-compiling.c Removed: ################################################################################ diff --git a/clang/include/clang/Basic/Cuda.h b/clang/include/clang/Basic/Cuda.h index 7f65d711bb3210..878f8d70f90c0a 100644 --- a/clang/include/clang/Basic/Cuda.h +++ b/clang/include/clang/Basic/Cuda.h @@ -117,7 +117,7 @@ enum class CudaArch { // public one. LAST, - CudaDefault = CudaArch::SM_35, + CudaDefault = CudaArch::SM_52, HIPDefault = CudaArch::GFX803, }; diff --git a/clang/test/Driver/cuda-cross-compiling.c b/clang/test/Driver/cuda-cross-compiling.c index a94e5801382d8f..12d0af3b45f32f 100644 --- a/clang/test/Driver/cuda-cross-compiling.c +++ b/clang/test/Driver/cuda-cross-compiling.c @@ -65,9 +65,9 @@ // RUN: %clang --target=nvptx64-nvidia-cuda -### --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \ // RUN: | FileCheck -check-prefix=DEFAULT %s -// DEFAULT: -cc1" "-triple" "nvptx64-nvidia-cuda" "-S" {{.*}} "-target-cpu" "sm_35" "-target-feature" "+ptx{{[0-9]+}}" {{.*}} "-o" "[[PTX:.+]].s" -// DEFAULT-NEXT: ptxas{{.*}}"-m64" "-O0" "--gpu-name" "sm_35" "--output-file" "[[CUBIN:.+]].cubin" "[[PTX]].s" "-c" -// DEFAULT-NEXT: nvlink{{.*}}"-o" "a.out" "-arch" "sm_35" {{.*}} "[[CUBIN]].cubin" +// DEFAULT: -cc1" "-triple" "nvptx64-nvidia-cuda" "-S" {{.*}} "-target-cpu" "sm_52" "-target-feature" "+ptx{{[0-9]+}}" {{.*}} "-o" "[[PTX:.+]].s" +// DEFAULT-NEXT: ptxas{{.*}}"-m64" "-O0" "--gpu-name" "sm_52" "--output-file" "[[CUBIN:.+]].cubin" "[[PTX]].s" "-c" +// DEFAULT-NEXT: nvlink{{.*}}"-o" "a.out" "-arch" "sm_52" {{.*}} "[[CUBIN]].cubin" // // Test to ensure that we enable handling global constructors in a freestanding _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits