From d53338df44111d2fc6281cb728b1cbab61e774be Mon Sep 17 00:00:00 2001 From: foreman Date: Wed, 1 Feb 2017 12:03:40 -0500 Subject: [PATCH] P4 to Git Change 1367969 by gandryey@gera-lnx-rcf-lc on 2017/02/01 11:53:10 SWDEV-112171 - [ROCm CQE][OCLonLC][QR][G] System hangs/Failures observed with few WF conf tests, due to CL#1364923 - Disable ROCr copy buffer and use runtime kernel to avoid HW hangs in integer_ops. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/blit.hpp#3 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocblit.cpp#12 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#29 edit [ROCm/clr commit: c0d4edda9d1a6fe76d5ad9b1a60f9558d7592d62] --- projects/clr/rocclr/runtime/device/blit.hpp | 1 + projects/clr/rocclr/runtime/device/rocm/rocblit.cpp | 5 +++-- projects/clr/rocclr/runtime/device/rocm/rocvirtual.cpp | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/clr/rocclr/runtime/device/blit.hpp b/projects/clr/rocclr/runtime/device/blit.hpp index 287fd5ab85..226637f653 100644 --- a/projects/clr/rocclr/runtime/device/blit.hpp +++ b/projects/clr/rocclr/runtime/device/blit.hpp @@ -37,6 +37,7 @@ public: uint disableFillBuffer_ : 1; uint disableFillImage_ : 1; uint disableCopyBufferToImageOpt_: 1; + uint disableHwlCopyBuffer_ : 1; }; uint32_t value_; Setup() : value_(0) {} diff --git a/projects/clr/rocclr/runtime/device/rocm/rocblit.cpp b/projects/clr/rocclr/runtime/device/rocm/rocblit.cpp index c4a9210ebb..f52a45bcda 100644 --- a/projects/clr/rocclr/runtime/device/rocm/rocblit.cpp +++ b/projects/clr/rocclr/runtime/device/rocm/rocblit.cpp @@ -2106,8 +2106,9 @@ KernelBlitManager::copyBuffer( amd::ScopedLock k(lockXferOps_); bool result = false; - if (!gpuMem(srcMemory).isHostMemDirectAccess() && - !gpuMem(dstMemory).isHostMemDirectAccess()) { + if (setup_.disableHwlCopyBuffer_ || + (!gpuMem(srcMemory).isHostMemDirectAccess() && + !gpuMem(dstMemory).isHostMemDirectAccess())) { uint blitType = BlitCopyBuffer; size_t dim = 1; size_t globalWorkOffset[3] = { 0, 0, 0 }; diff --git a/projects/clr/rocclr/runtime/device/rocm/rocvirtual.cpp b/projects/clr/rocclr/runtime/device/rocm/rocvirtual.cpp index 1d7c9f20db..85c58f66dc 100644 --- a/projects/clr/rocclr/runtime/device/rocm/rocvirtual.cpp +++ b/projects/clr/rocclr/runtime/device/rocm/rocvirtual.cpp @@ -539,6 +539,8 @@ VirtualGPU::create(bool profilingEna) } device::BlitManager::Setup blitSetup; + // todo ROCr hangs in a heavy MT environment(integer_ops long_math) + blitSetup.disableHwlCopyBuffer_ = true; blitMgr_ = new KernelBlitManager(*this, blitSetup); if ((NULL == blitMgr_) || !blitMgr_->create(roc_device_)) { LogError("Could not create BlitManager!");