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

@ -116,7 +116,10 @@ void KernelDataTest::buildAndDecode() {
if (kernelHeapSize) {
auto kernelAllocation = pKernelInfo->getGraphicsAllocation();
UNRECOVERABLE_IF(kernelAllocation == nullptr);
EXPECT_EQ(kernelAllocation->getUnderlyingBufferSize(), kernelHeapSize);
auto &device = pContext->getDevice(0)->getDevice();
auto &hwHelper = NEO::HwHelper::get(device.getHardwareInfo().platform.eRenderCoreFamily);
size_t isaPadding = hwHelper.getPaddingForISAAllocation();
EXPECT_EQ(kernelAllocation->getUnderlyingBufferSize(), kernelHeapSize + isaPadding);
auto kernelIsa = kernelAllocation->getUnderlyingBuffer();
EXPECT_EQ(0, memcmp(kernelIsa, pKernelInfo->heapInfo.pKernelHeap, kernelHeapSize));
} else {