[clang] [llvm] [CUDA] Add a pseudo GPU sm_next which allows overriding for SM/PTX version. (PR #100247)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 23 15:24:44 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 e7f8d4be5a5d494ac95e664e397004936976db16 44a1045eee71777fa916e2a8043b2f99afc96a96 --extensions cpp,c,h -- 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.c llvm/lib/Target/NVPTX/NVPTXSubtarget.cpp
``````````
</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 7f50b58aec..f714723db5 100644
--- a/clang/lib/Basic/Cuda.cpp
+++ b/clang/lib/Basic/Cuda.cpp
@@ -79,11 +79,9 @@ struct OffloadArchToStringMap {
};
} // namespace
-#define SM2(sm, ca) \
- { OffloadArch::SM_##sm, "sm_" #sm, ca }
+#define SM2(sm, ca) {OffloadArch::SM_##sm, "sm_" #sm, ca}
#define SM(sm) SM2(sm, "compute_" #sm)
-#define GFX(gpu) \
- { OffloadArch::GFX##gpu, "gfx" #gpu, "compute_amdgcn" }
+#define GFX(gpu) {OffloadArch::GFX##gpu, "gfx" #gpu, "compute_amdgcn"}
static const OffloadArchToStringMap arch_names[] = {
// clang-format off
{OffloadArch::UNUSED, "", ""},
``````````
</details>
https://github.com/llvm/llvm-project/pull/100247
More information about the cfe-commits
mailing list