[Openmp-commits] [PATCH] D129787: [OpenMP][AMDGPU] Add the support for `malloc` and `free` for AMDGPU

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 14 11:15:14 PDT 2022


jdoerfert added inline comments.


================
Comment at: openmp/libomptarget/DeviceRTL/include/Memory.h:18
+
+using size_t = uint64_t;
+
----------------
I don't think we can/should define it like this. Maybe `using size_t = decltype(sizeof(char));` instead? Also, this should arguably be in Types.h.


================
Comment at: openmp/libomptarget/DeviceRTL/src/Memory.cpp:31
+
+#pragma omp end declare variant
+///}
----------------
I think we want (now or later) a second level of indirection here.
malloc -> _OMP::impl::malloc -> (__ockl_dm_alloc, ...)

Also, we need to annotate all external functions properly, e.g., see malloc and free in State.cpp.
Finally, combine this with existing malloc/free declarations and uses in the runtime.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129787



More information about the Openmp-commits mailing list