[Openmp-commits] [PATCH] D141227: [OpenMP][libomptarget] Implement memory lock/unlock API in NextGen plugins

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Jan 8 09:57:20 PST 2023


jhuber6 added a comment.

In D141227#4034338 <https://reviews.llvm.org/D141227#4034338>, @tschuett wrote:

> https://github.com/openucx/ucx/blob/master/src/ucs/datastruct/pgtable.h super optimized page table for a similar use case.

That's interesting. We have another use inside of `libomptarget` where we need to determine if a pointer lies inside of an already mapped memory region. We could profile it and see if we could get some better performance with a more optimal implementation.



================
Comment at: openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp:1770-1771
+
+    hsa_status_t Status;
+    Status = hsa_amd_memory_lock(HstPtr, Size, nullptr, 0, &PinnedPtr);
+    if (auto Err = Plugin::check(Status, "Error in hsa_amd_memory_lock: %s\n"))
----------------
Nit, why not one line.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141227



More information about the Openmp-commits mailing list