[clang] [libc][nfc] Steps to allow sharing code between gpu intrin.h headers (PR #131134)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 13 05:56:31 PDT 2025
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 d3255474be3ea24d876eadb6e97a6424c132b23d f0149fdf6d8fcf60b128bef8aacf299e846cc4a8 --extensions h -- clang/lib/Headers/amdgpuintrin.h clang/lib/Headers/gpuintrin.h clang/lib/Headers/nvptxintrin.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Headers/gpuintrin.h b/clang/lib/Headers/gpuintrin.h
index 8d300b5b9a..515948b357 100644
--- a/clang/lib/Headers/gpuintrin.h
+++ b/clang/lib/Headers/gpuintrin.h
@@ -38,7 +38,6 @@ _Pragma("push_macro(\"bool\")");
_DEFAULT_FN_ATTRS static __inline__ uint64_t
__gpu_read_first_lane_u64(uint64_t __lane_mask, uint64_t __x);
-
#if defined(__NVPTX__)
#include <nvptxintrin.h>
#elif defined(__AMDGPU__)
@@ -47,7 +46,6 @@ __gpu_read_first_lane_u64(uint64_t __lane_mask, uint64_t __x);
#error "This header is only meant to be used on GPU architectures."
#endif
-
_Pragma("omp begin declare target device_type(nohost)");
_Pragma("omp begin declare variant match(device = {kind(gpu)})");
``````````
</details>
https://github.com/llvm/llvm-project/pull/131134
More information about the cfe-commits
mailing list