mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-07 21:27:04 +08:00
refactor: get ioh alignment from static function
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
1d3d3e9a79
commit
afee8814ef
@@ -90,6 +90,7 @@ using IsAtMostPVC = IsAtMostProduct<IGFX_PVC>;
|
||||
using IsNotPVC = IsNotWithinProducts<IGFX_PVC, IGFX_PVC>;
|
||||
using IsNotPvcOrDg2 = IsNotWithinProducts<IGFX_DG2, IGFX_PVC>;
|
||||
|
||||
using IsAtMostArl = IsAtMostProduct<IGFX_ARROWLAKE>;
|
||||
using IsAtLeastBmg = IsAtLeastProduct<IGFX_BMG>;
|
||||
|
||||
using HasStatefulSupport = IsNotAnyGfxCores<IGFX_XE_HPC_CORE>;
|
||||
|
||||
@@ -1629,3 +1629,17 @@ HWCMDTEST_F(IGFX_GEN8_CORE, CommandEncodeStatesTest, givenEncodeDispatchKernelWh
|
||||
|
||||
EXPECT_EQ(0u, EncodeDispatchKernel<FamilyType>::getInlineDataOffset(dispatchArgs));
|
||||
}
|
||||
HWTEST2_F(CommandEncodeStatesTest, givenEncodeDispatchKernelWhenGetIohAlignemntThenOneReturned, IsAtMostArl) {
|
||||
EXPECT_EQ(NEO::EncodeDispatchKernel<FamilyType>::getDefaultIOHAlignment(), 1u);
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandEncodeStatesTest, givenEncodeDispatchKernelWhenGetIohAlignemntThenCacheLineSizeReturned, IsAtLeastBmg) {
|
||||
EXPECT_EQ(NEO::EncodeDispatchKernel<FamilyType>::getDefaultIOHAlignment(), FamilyType::cacheLineSize);
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandEncodeStatesTest, givenEncodeDispatchKernelWhenForcingDifferentIohAlignemntThenExpectedAlignmentReturned, IsAtLeastBmg) {
|
||||
DebugManagerStateRestore restorer;
|
||||
auto expectedAlignemnt = 1024u;
|
||||
debugManager.flags.ForceIOHAlignment.set(expectedAlignemnt);
|
||||
EXPECT_EQ(NEO::EncodeDispatchKernel<FamilyType>::getDefaultIOHAlignment(), expectedAlignemnt);
|
||||
}
|
||||
@@ -595,7 +595,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenInlineDataRequiredWhe
|
||||
size_t expectedSizeIOH = alignUp(dispatchInterface->getCrossThreadDataSize() +
|
||||
dispatchInterface->getPerThreadDataSizeForWholeThreadGroup() -
|
||||
inlineDataSize,
|
||||
this->getHelper<GfxCoreHelper>().getIOHAlignment());
|
||||
NEO::EncodeDispatchKernel<FamilyType>::getDefaultIOHAlignment());
|
||||
auto heap = cmdContainer->getIndirectHeap(HeapType::indirectObject);
|
||||
EXPECT_EQ(expectedSizeIOH, heap->getUsed());
|
||||
}
|
||||
@@ -622,7 +622,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenInlineDataRequiredIsF
|
||||
|
||||
size_t expectedSizeIOH = alignUp(dispatchInterface->getCrossThreadDataSize() +
|
||||
dispatchInterface->getPerThreadDataSizeForWholeThreadGroup(),
|
||||
this->getHelper<GfxCoreHelper>().getIOHAlignment());
|
||||
NEO::EncodeDispatchKernel<FamilyType>::getDefaultIOHAlignment());
|
||||
auto heap = cmdContainer->getIndirectHeap(HeapType::indirectObject);
|
||||
EXPECT_EQ(expectedSizeIOH, heap->getUsed());
|
||||
}
|
||||
@@ -1613,6 +1613,6 @@ HWTEST2_F(CommandEncodeStatesTest, givenEncodeDispatchKernelWhenRequestingExtraP
|
||||
auto heap = cmdContainer->getIndirectHeap(HeapType::indirectObject);
|
||||
|
||||
size_t expectedConsumedSize = 64 + 1024;
|
||||
expectedConsumedSize = alignUp(expectedConsumedSize, pDevice->getGfxCoreHelper().getIOHAlignment());
|
||||
expectedConsumedSize = alignUp(expectedConsumedSize, NEO::EncodeDispatchKernel<FamilyType>::getDefaultIOHAlignment());
|
||||
EXPECT_EQ(expectedConsumedSize, heap->getUsed());
|
||||
}
|
||||
|
||||
@@ -25,21 +25,6 @@ HWTEST2_F(GfxCoreHelperXe2AndLaterTests, givenAtLeastXe2HpgWhenCallIsTimestampSh
|
||||
EXPECT_FALSE(gfxCoreHelper.isTimestampShiftRequired());
|
||||
}
|
||||
|
||||
HWTEST2_F(GfxCoreHelperXe2AndLaterTests, givenAtLeastXe2HpgWhenGetIOHAlignmentThenReturnsCorrectValue, IsAtLeastXe2HpgCore) {
|
||||
MockExecutionEnvironment mockExecutionEnvironment{};
|
||||
auto &gfxCoreHelper = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHelper<GfxCoreHelper>();
|
||||
EXPECT_EQ(gfxCoreHelper.getIOHAlignment(), 256u);
|
||||
}
|
||||
|
||||
HWTEST2_F(GfxCoreHelperXe2AndLaterTests, givenAtLeastXe2HpgAndForceIOHAlignmentFlagWhenGetIOHAlignmentThenReturnsCorrectValue, IsAtLeastXe2HpgCore) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceIOHAlignment.set(1024);
|
||||
|
||||
MockExecutionEnvironment mockExecutionEnvironment{};
|
||||
auto &gfxCoreHelper = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHelper<GfxCoreHelper>();
|
||||
EXPECT_EQ(gfxCoreHelper.getIOHAlignment(), 1024u);
|
||||
}
|
||||
|
||||
HWTEST2_F(GfxCoreHelperXe2AndLaterTests, givenDebugFlagWhenCheckingIsResolveDependenciesByPipeControlsSupportedThenCorrectValueIsReturned, IsLNL) {
|
||||
DebugManagerStateRestore restorer;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user