From e324c5a70ad3540a14d310c227dd9cf37f097bd1 Mon Sep 17 00:00:00 2001 From: foreman Date: Mon, 29 Jul 2019 18:46:20 -0400 Subject: [PATCH] P4 to Git Change 1975344 by gandryey@gera-win10 on 2019/07/29 18:38:59 SWDEV-79445 - OCL generic changes and code clean-up - Remove buffer allocation for unimplemented image copy optimization Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocblit.cpp#33 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocblit.hpp#13 edit [ROCm/clr commit: 833d62445bcab263d36c3393991c45061797870e] --- .../rocclr/runtime/device/rocm/rocblit.cpp | 38 ------------------- .../rocclr/runtime/device/rocm/rocblit.hpp | 1 - 2 files changed, 39 deletions(-) diff --git a/projects/clr/rocclr/runtime/device/rocm/rocblit.cpp b/projects/clr/rocclr/runtime/device/rocm/rocblit.cpp index 11011aa550..5704e05b2f 100644 --- a/projects/clr/rocclr/runtime/device/rocm/rocblit.cpp +++ b/projects/clr/rocclr/runtime/device/rocm/rocblit.cpp @@ -695,10 +695,6 @@ KernelBlitManager::KernelBlitManager(VirtualGPU& gpu, Setup setup) kernels_[i] = nullptr; } - for (uint i = 0; i < MaxXferBuffers; ++i) { - xferBuffers_[i] = nullptr; - } - completeOperation_ = false; } @@ -721,12 +717,6 @@ KernelBlitManager::~KernelBlitManager() { constantBuffer_->release(); } - for (uint i = 0; i < MaxXferBuffers; ++i) { - if (nullptr != xferBuffers_[i]) { - xferBuffers_[i]->release(); - } - } - delete lockXferOps_; } @@ -788,34 +778,6 @@ bool KernelBlitManager::createProgram(Device& device) { return false; } - if (dev().settings().xferBufSize_ > 0) { - xferBufferSize_ = dev().settings().xferBufSize_; - for (uint i = 0; i < MaxXferBuffers; ++i) { - // Create internal xfer buffers for image copy optimization - xferBuffers_[i] = new (*context_) amd::Buffer(*context_, 0, xferBufferSize_); - - // Assign the xfer buffer to the current virtual GPU - xferBuffers_[i]->setVirtualDevice(&gpu()); - - if ((xferBuffers_[i] != nullptr) && !xferBuffers_[i]->create(nullptr)) { - xferBuffers_[i]->release(); - xferBuffers_[i] = nullptr; - return false; - } else if (xferBuffers_[i] == nullptr) { - return false; - } - - //! @note Workaround for conformance allocation test. - //! Force GPU mem alloc. - //! Unaligned images require xfer optimization, - //! but deferred memory allocation can cause - //! virtual heap fragmentation for big allocations and - //! then fail the following test with 32 bit ISA, because - //! runtime runs out of 4GB space. - dev().getRocMemory(xferBuffers_[i]); - } - } - lockXferOps_ = new amd::Monitor("Transfer Ops Lock", true); if (nullptr == lockXferOps_) { return false; diff --git a/projects/clr/rocclr/runtime/device/rocm/rocblit.hpp b/projects/clr/rocclr/runtime/device/rocm/rocblit.hpp index d2103005eb..404067f7c0 100644 --- a/projects/clr/rocclr/runtime/device/rocm/rocblit.hpp +++ b/projects/clr/rocclr/runtime/device/rocm/rocblit.hpp @@ -430,7 +430,6 @@ class KernelBlitManager : public DmaBlitManager { amd::Program* program_; //!< GPU program obejct amd::Kernel* kernels_[BlitTotal]; //!< GPU kernels for blit amd::Memory* constantBuffer_; //!< An internal CB for blits - amd::Memory* xferBuffers_[MaxXferBuffers]; //!< Transfer buffers for images size_t xferBufferSize_; //!< Transfer buffer size amd::Monitor* lockXferOps_; //!< Lock transfer operation };