[Openmp-commits] [openmp] 02ce822 - [NFC][OpenMP][OMPX] Move `declare variant` up

Shilei Tian via Openmp-commits openmp-commits at lists.llvm.org
Mon May 6 20:47:13 PDT 2024


Author: Shilei Tian
Date: 2024-05-06T23:46:18-04:00
New Revision: 02ce8227ac28e0b83cf780716ae8f912d076eebe

URL: https://github.com/llvm/llvm-project/commit/02ce8227ac28e0b83cf780716ae8f912d076eebe
DIFF: https://github.com/llvm/llvm-project/commit/02ce8227ac28e0b83cf780716ae8f912d076eebe.diff

LOG: [NFC][OpenMP][OMPX] Move `declare variant` up

Added: 
    

Modified: 
    openmp/runtime/src/include/ompx.h.var

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/src/include/ompx.h.var b/openmp/runtime/src/include/ompx.h.var
index 5dd8e8355e4c08..579d31aa98c54e 100644
--- a/openmp/runtime/src/include/ompx.h.var
+++ b/openmp/runtime/src/include/ompx.h.var
@@ -50,9 +50,12 @@ enum {
   ompx_dim_z = 2,
 };
 
+// TODO: The following implementation is for host fallback. We need to disable
+// generation of host fallback in kernel language mode.
+#pragma omp begin declare variant match(device = {kind(cpu)})
+
 /// ompx_{thread,block}_{id,dim}
 ///{
-#pragma omp begin declare variant match(device = {kind(cpu)})
 #define _TGT_KERNEL_LANGUAGE_HOST_IMPL_GRID_C(NAME, VALUE)                     \
   static inline int ompx_##NAME(int Dim) { return VALUE; }
 


        


More information about the Openmp-commits mailing list