From 95c01935b8a1def724bf196d3379384c3d0629f4 Mon Sep 17 00:00:00 2001 From: German Andryeyev Date: Tue, 16 Nov 2021 14:17:21 -0500 Subject: [PATCH] SWDEV-305016 - Correct timeout logic Timeout logic should be applied always even if the wait is active. Change-Id: I2e5db7ac8a0f9a0355ad7b40e4227d76fb002aa0 [ROCm/clr commit: 9877fc9dbfc38c2eeca10c022197c37322970a0c] --- projects/clr/rocclr/device/rocm/rocvirtual.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/clr/rocclr/device/rocm/rocvirtual.hpp b/projects/clr/rocclr/device/rocm/rocvirtual.hpp index 27840770c4..e21e38ffef 100644 --- a/projects/clr/rocclr/device/rocm/rocvirtual.hpp +++ b/projects/clr/rocclr/device/rocm/rocvirtual.hpp @@ -50,7 +50,8 @@ inline bool WaitForSignal(hsa_signal_t signal, bool active_wait = false) { uint64_t timeout = kTimeout100us; if (active_wait) { timeout = kUnlimitedWait; - } else if (active_wait_timeout) { + } + if (active_wait_timeout) { timeout = ROC_ACTIVE_WAIT_TIMEOUT * K; if (timeout == 0) { return false;