[Openmp-commits] [openmp] [OpenMP] Remove declaration and usage of __AMDGCN_WAVEFRONT_SIZE (PR #143761)
Fabian Ritter via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jun 12 00:13:04 PDT 2025
================
@@ -9,13 +9,21 @@
#ifndef __OMPX_H
#define __OMPX_H
-#ifdef __AMDGCN_WAVEFRONT_SIZE
-#define __WARP_SIZE __AMDGCN_WAVEFRONT_SIZE
-#else
-#define __WARP_SIZE 32
+#if (defined(__NVPTX__) || defined(__AMDGPU__))
+ #include <gpuintrin.h>
+ #define OMPX_TARGET_IS_GPU
#endif
typedef unsigned long uint64_t;
+typedef unsigned int uint32_t;
+
+inline uint32_t gpu_num_lanes(void) {
----------------
ritter-x2a wrote:
Maybe use `static inline` for consistency with the other functions here and for limiting linkage, and an identifier for the function that starts with one or two underscores `_` to avoid potential name clashes with user code?
https://github.com/llvm/llvm-project/pull/143761
More information about the Openmp-commits
mailing list