From cd0cc0ec2b09c72d4f26c1cfa296184cea7a0455 Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 15 Jan 2015 18:27:43 -0500
Subject: [PATCH] P4 to Git Change 1112144 by gandryey@gera-dev-w7 on
2015/01/15 17:50:43
ECR #304775 - Move GPU wait outside of the device lock operation for staging buffers
- Wait can occur per queue independently
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#491 edit
[ROCm/clr commit: 8aafdbd80d5c2100996a9343692e52bdb4b19fa9]
---
projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp b/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp
index 586fea9129..c83148de0d 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp
@@ -357,11 +357,11 @@ Device::XferBuffers::acquire()
void
Device::XferBuffers::release(VirtualGPU& gpu, Resource& buffer)
{
- // Lock the operations with the staged buffer list
- amd::ScopedLock l(lock_);
// Make sure buffer isn't busy on the current VirtualGPU, because
// the next aquire can come from different queue
buffer.wait(gpu);
+ // Lock the operations with the staged buffer list
+ amd::ScopedLock l(lock_);
freeBuffers_.push_back(&buffer);
--acquiredCnt_;
}