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!");