Linker: Fix incremental patching for local memory allocations

Change-Id: Ib85e4a2abc8a62477003853aa0c35f8107444f4e
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2020-10-07 15:32:03 +02:00
committed by sys_ocldev
parent 2643346b48
commit fb0651521d
24 changed files with 115 additions and 73 deletions

View File

@@ -437,7 +437,7 @@ bool KernelInfo::createKernelAllocation(const Device &device) {
if (kernelAllocation->isAllocatedInLocalMemoryPool() && hwHelper.isBlitCopyRequiredForLocalMemory(hwInfo)) {
status = (BlitHelperFunctions::blitMemoryToAllocation(device, kernelAllocation, 0, heapInfo.pKernelHeap, {kernelIsaSize, 1, 1}) == BlitOperationResult::Success);
} else {
status = device.getMemoryManager()->copyMemoryToAllocation(kernelAllocation, heapInfo.pKernelHeap, kernelIsaSize);
status = device.getMemoryManager()->copyMemoryToAllocation(kernelAllocation, 0, heapInfo.pKernelHeap, kernelIsaSize);
}
return status;

View File

@@ -111,7 +111,7 @@ cl_int Program::linkBinary(Device *pDevice, const void *constantsInitData, const
}
auto &kernHeapInfo = kernelInfo->heapInfo;
auto segmentId = &kernelInfo - &this->kernelInfoArray[0];
this->pDevice->getMemoryManager()->copyMemoryToAllocation(kernelInfo->getGraphicsAllocation(),
this->pDevice->getMemoryManager()->copyMemoryToAllocation(kernelInfo->getGraphicsAllocation(), 0,
isaSegmentsForPatching[segmentId].hostPointer,
kernHeapInfo.KernelHeapSize);
}