[Openmp-commits] [openmp] [OpenMP] Enable automatic unified shared memory on MI300A. (PR #77512)

Joseph Huber via Openmp-commits openmp-commits at lists.llvm.org
Fri Jan 12 12:54:27 PST 2024


================
@@ -144,19 +144,32 @@ void PluginAdaptorTy::initDevices(PluginManager &PM) {
 
   int32_t NumPD = getNumberOfPluginDevices();
   ExclusiveDevicesAccessor->reserve(DeviceOffset + NumPD);
+  // Auto zero-copy is a per-device property. We need to ensure
+  // that all devices are suggesting to use it.
+  bool UseAutoZeroCopy = true;
+  if (NumPD == 0)
+    UseAutoZeroCopy = false;
----------------
jhuber6 wrote:

nit. could initialize this to `NumPD == 0`.

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


More information about the Openmp-commits mailing list