P4 to Git Change 1329979 by gandryey@gera-w8 on 2016/10/21 13:26:53
SWDEV-86035 - Add PAL backend to OpenCL - Allow device memory usage for blit kernels Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palblit.cpp#11 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#27 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.hpp#11 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#11 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#11 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.hpp#9 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.cpp#15 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#32 edit
This commit is contained in:
@@ -394,22 +394,12 @@ HSAILKernel::aqlCreateHWInfo(amd::hsa::loader::Symbol *sym)
|
||||
if (!prog().isNull()) {
|
||||
code_ = new Memory(dev(), amd::alignUp(codeSize_, akc_align));
|
||||
Resource::MemoryType type = Resource::Local;
|
||||
if (flags_.internalKernel_) {
|
||||
type = Resource::RemoteUSWC;
|
||||
}
|
||||
|
||||
// Initialize kernel ISA code
|
||||
if (code_ && code_->create(type)) {
|
||||
if (flags_.internalKernel_) {
|
||||
address cpuCodePtr = static_cast<address>(code_->map(nullptr, Resource::WriteOnly));
|
||||
// Copy only amd_kernel_code_t
|
||||
memcpy(cpuCodePtr, reinterpret_cast<address>(akc), codeSize_);
|
||||
code_->unmap(nullptr);
|
||||
}
|
||||
else {
|
||||
static_cast<const KernelBlitManager&>(dev().xferMgr()).writeRawData(
|
||||
*code_, codeSize_, reinterpret_cast<void*>(akc));
|
||||
}
|
||||
constexpr bool WaitForUpload = true;
|
||||
code_->writeRawData(*code_->dev().xferQueue(), 0, codeSize_,
|
||||
reinterpret_cast<void*>(akc), WaitForUpload);
|
||||
}
|
||||
else {
|
||||
LogError("Failed to allocate ISA code!");
|
||||
|
||||
Reference in New Issue
Block a user