================
@@ -772,12 +772,22 @@ getKernelLaunchEnvironment(DeviceTy &Device, uint32_t
OmpABIVersion,
freeAfterSynchronization(Device, AsyncInfo, *ReductionAllocOrErr);
}
- if (Device.submitData(*AllocOrErr, &LocalKLE,
- sizeof(KernelLaunchEnvironmentTy), AsyncInfo,
- /*Entry=*/nullptr, /*HDTTMapPtr=*/nullptr,
- /*Loc=*/nullptr, /*Name=*/"KernelLaunchEnv"))
+ INFO(OMP_INFOTYPE_DATA_TRANSFER, Device.DeviceID,
+ "Copying data from host to device, HstPtr=" DPxMOD ", TgtPtr=" DPxMOD
+ ", Size=%" PRId64 ", Name=KernelLaunchEnv\n",
+ DPxPTR(&LocalKLE), DPxPTR(*AllocOrErr),
+ sizeof(KernelLaunchEnvironmentTy));
+
+ // The allocation is fresh, so no work pending on the queue accesses it and
+ // the copy can bypass the queue. Without a queue, the plugin may write the
+ // memory directly.
+ if (const auto *Res = olMemcpy(
----------------
adurang wrote:
Any reason to use olMemcpy directly here? I think you could use submitDataSync.
https://github.com/llvm/llvm-project/pull/231923
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits