[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 05:48:57 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) {
+ #ifdef OMPX_TARGET_IS_GPU
+ return __gpu_num_lanes();
+ #else
+ return 1;
----------------
ritter-x2a wrote:
So this header is not used for anything non-(AMD/NVIDIA-)GPU that would still expect a 32 here?
https://github.com/llvm/llvm-project/pull/143761
More information about the Openmp-commits
mailing list