diff options
author | Shilei Tian <i@tianshilei.me> | 2024-05-06 23:46:18 -0400 |
---|---|---|
committer | Shilei Tian <i@tianshilei.me> | 2024-05-06 23:46:18 -0400 |
commit | 02ce8227ac28e0b83cf780716ae8f912d076eebe (patch) | |
tree | a6cbbcca7fcab5e850c6308b537e7ad5eebab94f /openmp/runtime | |
parent | dfa7ff97b24dc5a3dd714b45af288812c13d0110 (diff) | |
download | llvm-02ce8227ac28e0b83cf780716ae8f912d076eebe.zip llvm-02ce8227ac28e0b83cf780716ae8f912d076eebe.tar.gz llvm-02ce8227ac28e0b83cf780716ae8f912d076eebe.tar.bz2 |
[NFC][OpenMP][OMPX] Move `declare variant` up
Diffstat (limited to 'openmp/runtime')
-rw-r--r-- | openmp/runtime/src/include/ompx.h.var | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/openmp/runtime/src/include/ompx.h.var b/openmp/runtime/src/include/ompx.h.var index 5dd8e83..579d31a 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; } |