Add padding for ISA allocations

Related-To: NEO-5771
Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2021-04-23 14:09:03 +00:00
committed by Compute-Runtime-Automation
parent 0d05ef2a3c
commit bb9d902899
11 changed files with 72 additions and 14 deletions

View File

@ -734,7 +734,11 @@ void Kernel::substituteKernelHeap(void *newKernelHeap, size_t newKernelHeapSize)
auto currentAllocationSize = pKernelInfo->kernelAllocation->getUnderlyingBufferSize();
bool status = false;
if (currentAllocationSize >= newKernelHeapSize) {
const auto &hwInfo = clDevice.getHardwareInfo();
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
size_t isaPadding = hwHelper.getPaddingForISAAllocation();
if (currentAllocationSize >= newKernelHeapSize + isaPadding) {
auto &hwInfo = clDevice.getDevice().getHardwareInfo();
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
status = MemoryTransferHelper::transferMemoryToAllocation(hwHelper.isBlitCopyRequiredForLocalMemory(hwInfo, *pKernelInfo->getGraphicsAllocation()),