================
@@ -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,
----------------
Ritanya-B-Bharadwaj wrote:

Right, I get that OMP_MAP_LITERAL just passes the pointer(or anything that fits 
into a register as you mentioned) as is, without changing anything.  But the 
problem is, it doesn’t guarantee that the memory it points to is actually 
accessible on the device. OMP_MAP_SELF explicitly states that the memory is 
already available on the device and avoids unnecessary mappings. The idea was 
to avoid unnecessary copies, especially for USM. 
If there’s another way to handle this cleanly, I’m open to discussing it. 
Please let me know. 

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