From b70968d76966a67b66121c24bc7c039d0a9c9ccd Mon Sep 17 00:00:00 2001 From: Rahul Manocha Date: Thu, 22 Aug 2024 00:22:20 +0000 Subject: [PATCH] SWDEV-480536 - Disable cpu wait in device synchronize 1) currently cpu wait is set to true, which makes the host wait for last command in queue to finish even if the kernel execution has already finished causing delay in device sync call. 2) device sync only needs to await completion when hw event is not ready. Change-Id: I91e3e89d39a1193ae06abac822cea8ae651493a5 [ROCm/clr commit: eb1089593ee01bf2e9a0e12a33d71df210ee5aac] --- projects/clr/hipamd/src/hip_device_runtime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clr/hipamd/src/hip_device_runtime.cpp b/projects/clr/hipamd/src/hip_device_runtime.cpp index 50ed95e068..0d2d2d6cf3 100644 --- a/projects/clr/hipamd/src/hip_device_runtime.cpp +++ b/projects/clr/hipamd/src/hip_device_runtime.cpp @@ -635,7 +635,7 @@ hipError_t hipDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, hipError_t hipDeviceSynchronize() { HIP_INIT_API(hipDeviceSynchronize); CHECK_SUPPORTED_DURING_CAPTURE(); - constexpr bool kDoWaitForCpu = true; + constexpr bool kDoWaitForCpu = false; hip::getCurrentDevice()->SyncAllStreams(kDoWaitForCpu); HIP_RETURN(hipSuccess); }