================
@@ -236,6 +236,8 @@ enum class OpenMPOffloadMappingFlags : uint64_t {
   // dynamic.
   // This is an OpenMP extension for the sake of OpenACC support.
   OMP_MAP_OMPX_HOLD = 0x2000,
+  /// Self directs mapping without creating a separate device copy.
+  OMP_MAP_SELF = 0x4000,
----------------
dreachem wrote:

Will try to recap discussion from LLVM/OpenMP meeting today. We need the 
separate flag for a self map for a few reasons:
1. Self map may require an extra action to register/pin the host memory to make 
it accessible. And if it's unable to make it accessible, the spec requires that 
a runtime error is emitted. Just passing in the host address to the kernel 
without ensuring that it is accessible isn't sufficient.
2. We need to track self maps in the present table for explicit present checks 
from the user (through `omp_target_is_present` or a `present` modifier).

https://github.com/llvm/llvm-project/pull/134131
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to