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: 833d62445b]
This commit is contained in:
foreman
2019-07-29 18:46:20 -04:00
parent 87f0c3010c
commit e324c5a70a
2 changed files with 0 additions and 39 deletions
@@ -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;
@@ -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
};