[Openmp-commits] [openmp] [OpenMP][libomptarget] Enable automatic unified shared memory executi… (PR #75999)

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Thu Dec 21 10:48:26 PST 2023


================
@@ -208,6 +213,13 @@ struct PluginManager {
 
   /// Devices associated with plugins, accesses to the container are exclusive.
   ProtectedObj<DeviceContainerTy> Devices;
+
+  /// Whe running on an APU, the GPU plugin may decide to
+  /// run in zero-copy even though the user did not program
+  /// their application with unified_shared_memory requirement.
+  /// This execution modality is called auto zero-copy and it is
+  /// cached information from the Plugin.
+  bool UseAutoZeroCopy = false;
----------------
jdoerfert wrote:

I'm fine with doing it per plugin for now, but I would like to avoid the extra bool here and the getter/setter. Can we add a new requirements flag:
`OMPX_REQ_AUTO_ZERO_COPY`
and reuse the requirement stuff instead of adding a on-off bool in many places?

https://github.com/llvm/llvm-project/pull/75999


More information about the Openmp-commits mailing list