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

Jean-Baptiste Skutnik via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Feb 27 10:43:45 PST 2023


spoutn1k added inline comments.


================
Comment at: openmp/libomptarget/DeviceRTL/src/State.cpp:69-86
+/// Intel implementations of the shuffle sync idiom.
+///
+///{
+#pragma omp begin declare variant match(device = {arch(spir64)})
+
+extern "C" {
+void *malloc(uint64_t Size) {
----------------
This is only defined for AMDGCN with a TODO, in a way that seems to overwrite the default `malloc`. Should I do the same for this implementation ?


================
Comment at: openmp/libomptarget/DeviceRTL/src/Utils.cpp:87-91
+void Unpack(uint64_t Val, uint32_t *LowBits, uint32_t *HighBits) {
+  // TODO
+}
+
+uint64_t Pack(uint32_t LowBits, uint32_t HighBits) { return 0; }
----------------
Found `shuffle` below in the spirv interface but not pack. Should I start using bitwise operation the way it is done for AMD ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144893



More information about the Openmp-commits mailing list