[PATCH] D156936: [Clang] Increase default architecture from sm_35 to sm_52
Joseph Huber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 2 13:32:41 PDT 2023
jhuber6 created this revision.
jhuber6 added reviewers: tra, jdoerfert, yaxunl, jlebar.
Herald added a project: All.
jhuber6 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D156936
Files:
clang/include/clang/Basic/Cuda.h
clang/test/Driver/cuda-cross-compiling.c
Index: clang/test/Driver/cuda-cross-compiling.c
===================================================================
--- clang/test/Driver/cuda-cross-compiling.c
+++ 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
Index: clang/include/clang/Basic/Cuda.h
===================================================================
--- clang/include/clang/Basic/Cuda.h
+++ clang/include/clang/Basic/Cuda.h
@@ -117,7 +117,7 @@
// public one.
LAST,
- CudaDefault = CudaArch::SM_35,
+ CudaDefault = CudaArch::SM_52,
HIPDefault = CudaArch::GFX803,
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156936.546589.patch
Type: text/x-patch
Size: 1517 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230802/455d9d3c/attachment.bin>
More information about the cfe-commits
mailing list