refactor: get ioh alignment from static function

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2024-07-24 11:27:35 +00:00
committed by Compute-Runtime-Automation
parent 1d3d3e9a79
commit afee8814ef
22 changed files with 65 additions and 52 deletions

View File

@@ -997,11 +997,10 @@ struct CmdlistAppendLaunchKernelWithImplicitArgsTests : CmdlistAppendLaunchKerne
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
const auto &rootDeviceEnvironment = device->getNEODevice()->getRootDeviceEnvironment();
const auto &gfxCoreHelper = device->getNEODevice()->getGfxCoreHelper();
implicitArgsProgrammingSize = ImplicitArgsHelper::getSizeForImplicitArgsPatching(&expectedImplicitArgs, *kernelDescriptor, !kernelRequiresGenerationOfLocalIdsByRuntime, rootDeviceEnvironment);
auto sizeCrossThreadData = kernel->getCrossThreadDataSize();
auto sizePerThreadDataForWholeGroup = kernel->getPerThreadDataSizeForWholeThreadGroup();
EXPECT_EQ(indirectHeap->getUsed(), alignUp(sizeCrossThreadData + sizePerThreadDataForWholeGroup + implicitArgsProgrammingSize, gfxCoreHelper.getIOHAlignment()));
EXPECT_EQ(indirectHeap->getUsed(), alignUp(sizeCrossThreadData + sizePerThreadDataForWholeGroup + implicitArgsProgrammingSize, NEO::EncodeDispatchKernel<FamilyType>::getDefaultIOHAlignment()));
if (FamilyType::supportsCmdSet(IGFX_XE_HP_CORE)) {
expectedImplicitArgs.localIdTablePtr = indirectHeapAllocation->getGpuAddress();

View File

@@ -3018,7 +3018,7 @@ HWTEST2_F(CommandListAppendLaunchKernel,
auto ioh = commandContainer.getIndirectHeap(NEO::IndirectHeapType::indirectObject);
size_t totalSize = 1024 + 64;
size_t expectedSize = alignUp(totalSize, device->getGfxCoreHelper().getIOHAlignment());
size_t expectedSize = alignUp(totalSize, NEO::EncodeDispatchKernel<FamilyType>::getDefaultIOHAlignment());
EXPECT_EQ(expectedSize, ioh->getUsed());
}