From 2f3ad43c4ac26b2fc5add97af5765a1842a0a907 Mon Sep 17 00:00:00 2001 From: German Andryeyev Date: Tue, 26 Mar 2024 11:45:29 -0400 Subject: [PATCH] SWDEV-449922 - Remove a global lock for queues on wait The new logic has a lock for PAL call and doesn't require the lock for queues. Change-Id: I61b67c3c4abd2ede44809de1d6beed756766032e --- rocclr/device/pal/palresource.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rocclr/device/pal/palresource.cpp b/rocclr/device/pal/palresource.cpp index d0676b2fb6..3c9fc843f2 100644 --- a/rocclr/device/pal/palresource.cpp +++ b/rocclr/device/pal/palresource.cpp @@ -1385,13 +1385,12 @@ void Resource::free() { // and resource can be reused on another async queue without a wait on a busy operation if (wait) { if (memRef_->gpu_ == nullptr) { - Device::ScopedLockVgpus lock(dev()); + amd::ScopedLock l(dev().vgpusAccess()); // Release all memory objects on all virtual GPUs for (uint idx = 1; idx < dev().vgpus().size(); ++idx) { dev().vgpus()[idx]->waitForEvent(&events_[idx]); } } else { - amd::ScopedLock l(memRef_->gpu_->execution()); memRef_->gpu_->waitForEvent(&events_[memRef_->gpu_->index()]); } } else {