[clang] [llvm] [CUDA] Add support for CUDA-12.6 and sm_100 (PR #112028)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 14 10:48:23 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 7f1b465c6ae476e59dc90652d58fc648932d23b1 aee63aee2c275d20596e9637905573815c01adee --extensions h,cpp,c -- clang/include/clang/Basic/Cuda.h clang/lib/Basic/Cuda.cpp clang/lib/Basic/Targets/NVPTX.cpp clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp clang/lib/Driver/ToolChains/Cuda.cpp clang/test/Misc/target-invalid-cpu-note/nvptx.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Basic/Cuda.cpp b/clang/lib/Basic/Cuda.cpp
index c757bb7a16..08989b6c2c 100644
--- a/clang/lib/Basic/Cuda.cpp
+++ b/clang/lib/Basic/Cuda.cpp
@@ -224,7 +224,8 @@ CudaVersion MinVersionForOffloadArch(OffloadArch A) {
case OffloadArch::SM_90a:
return CudaVersion::CUDA_120;
case OffloadArch::SM_100:
- return CudaVersion::NEW; // TODO: use specific CUDA version once it's public.
+ return CudaVersion::NEW; // TODO: use specific CUDA version once it's
+ // public.
default:
llvm_unreachable("invalid enum");
}
diff --git a/clang/lib/Driver/ToolChains/Cuda.cpp b/clang/lib/Driver/ToolChains/Cuda.cpp
index 0a401fa5af..08c54f71bb 100644
--- a/clang/lib/Driver/ToolChains/Cuda.cpp
+++ b/clang/lib/Driver/ToolChains/Cuda.cpp
@@ -671,10 +671,10 @@ void NVPTX::getNVPTXTargetFeatures(const Driver &D, const llvm::Triple &Triple,
case CudaVersion::CUDA_##CUDA_VER: \
PtxFeature = "+ptx" #PTX_VER; \
break;
- // TODO: Use specific CUDA version once it's public.
- case clang::CudaVersion::NEW:
- PtxFeature = "+ptx86";
- break;
+ // TODO: Use specific CUDA version once it's public.
+ case clang::CudaVersion::NEW:
+ PtxFeature = "+ptx86";
+ break;
CASE_CUDA_VERSION(126, 85);
CASE_CUDA_VERSION(125, 85);
CASE_CUDA_VERSION(124, 84);
``````````
</details>
https://github.com/llvm/llvm-project/pull/112028
More information about the cfe-commits
mailing list