[PATCH] D144893: [OpenMP][WIP] `spir64` device runtime library template

Shilei Tian via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 16:54:26 PST 2023


tianshilei1992 added inline comments.


================
Comment at: llvm/lib/Frontend/OpenMP/OMPContext.cpp:55
+  case Triple::spir64:
     ActiveTraits.set(unsigned(TraitProperty::device_kind_gpu));
     break;
----------------
SPIR-V can be for host as well right? OpenCL CPU runtime can also take SPIR-V.


================
Comment at: openmp/libomptarget/DeviceRTL/src/LibC.cpp:37
+/// Intel implementation
+#pragma omp begin declare variant match(device = {arch(spir64)})
+namespace impl {
----------------
I'm thinking potentially we can have a generic implementation of `omp_vprintf` that just returns -1 and having the NVPTX version calls `vprintf`. In this way we don't need to do it for every target.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144893/new/

https://reviews.llvm.org/D144893



More information about the llvm-commits mailing list