[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
----------------
ritter-x2a wrote:

Should this identifier start with double underscores, `__OMPX_TARGET_IS_GPU`, to use an name that is reserved for this kind of implementation detail?

https://github.com/llvm/llvm-project/pull/143761


More information about the Openmp-commits mailing list