P4 to Git Change 1367810 by gandryey@gera-w8 on 2017/01/31 19:02:27

SWDEV-112171 - [ROCm CQE][OCLonLC][QR][G] System hangs/Failures observed with few WF conf tests, due to CL#1364923
	- Make HSA copy call lock protected, due to a possible race condition and HW hangs in integer_ops long_math test

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocblit.cpp#10 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#39 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.hpp#15 edit


[ROCm/clr commit: a7a4a6dbad]
This commit is contained in:
foreman
2017-01-31 19:09:43 -05:00
parent 9e93e41146
commit 01482a67c9
3 changed files with 18 additions and 0 deletions
@@ -189,6 +189,7 @@ Device::Device(hsa_agent_t bkendDevice)
, xferQueue_(nullptr)
, xferRead_(nullptr)
, xferWrite_(nullptr)
, hsaCopyOps_(nullptr)
, numOfVgpus_(0)
{
group_segment_.handle = 0;
@@ -207,6 +208,7 @@ Device::~Device()
}
delete mapCache_;
delete mapCacheOps_;
delete hsaCopyOps_;
// Destroy temporary buffers for read/write
delete xferRead_;
@@ -626,6 +628,11 @@ Device::create()
return false;
}
hsaCopyOps_ = new amd::Monitor("HSA copy Lock", true);
if (nullptr == hsaCopyOps_) {
return false;
}
mapCache_ = new std::vector<amd::Memory*>();
if (mapCache_ == NULL) {
return false;