[llvm] [OFFLOAD] Add memory data locking API for libomptarget migration (PR #173138)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 8 12:56:07 PST 2026
================
@@ -131,3 +136,44 @@ def olMemFill : Function {
Return<"OL_ERRC_INVALID_SIZE", ["`FillSize % PatternSize != 0`"]>
];
}
+
+def olMemRegister : Function {
+ let desc = "Register and page-lock host memory so it can be accessible by the device.";
+ let details = [
+ "Pins host memory to optimize transfers and returns the device accessible",
+ "pointer that devices should use for memory transfers involving the host",
+ "pinned allocation. If the buffer intersects with other existing buffer,",
+ "a new user will be registered. A partial overlapping is not allowed.",
+ "The pinned pointer can be accessed both on host and device and",
+ "no guarantees are made about consistency.",
+ "The pinned pointer should be used to execute memory transfers.",
+ "The functionality is currently implemented for AMD only",
----------------
jhuber6 wrote:
Isn't the point of pinning memory also to provide a stable pointer for memory accesses?
https://github.com/llvm/llvm-project/pull/173138
More information about the llvm-commits
mailing list