Revert "performance: optimize memory used for scratch programming"
This reverts commit 9b2696a942
.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
parent
cb0b69a1cb
commit
abcb462ac3
|
@ -36,10 +36,7 @@ namespace L0 {
|
||||||
|
|
||||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||||
size_t CommandListCoreFamily<gfxCoreFamily>::getReserveSshSize() {
|
size_t CommandListCoreFamily<gfxCoreFamily>::getReserveSshSize() {
|
||||||
using RENDER_SURFACE_STATE = typename GfxFamily::RENDER_SURFACE_STATE;
|
return 4 * MemoryConstants::pageSize;
|
||||||
return 16 /* max ptss steps */
|
|
||||||
* 2 * 2 /* two slots and two steps */
|
|
||||||
* sizeof(RENDER_SURFACE_STATE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||||
|
|
|
@ -142,8 +142,13 @@ void CommandQueueHw<gfxCoreFamily>::handleScratchSpace(NEO::HeapContainer &sshHe
|
||||||
csr->getOsContext(), gsbaState, frontEndState);
|
csr->getOsContext(), gsbaState, frontEndState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NEO::Device *neoDevice = device->getNEODevice();
|
||||||
|
auto &gfxCoreHelper = neoDevice->getGfxCoreHelper();
|
||||||
|
auto &productHelper = neoDevice->getProductHelper();
|
||||||
|
|
||||||
if (sshHeaps.size() > 0) {
|
if (sshHeaps.size() > 0) {
|
||||||
scratchController->programHeaps(sshHeaps, 0u, perThreadScratchSpaceSlot0Size, perThreadScratchSpaceSlot1Size,
|
uint32_t offsetIndex = gfxCoreHelper.getMaxPtssIndex(productHelper) * csr->getOsContext().getEngineType() + 1u;
|
||||||
|
scratchController->programHeaps(sshHeaps, offsetIndex, perThreadScratchSpaceSlot0Size, perThreadScratchSpaceSlot1Size,
|
||||||
csr->getOsContext(), gsbaState, frontEndState);
|
csr->getOsContext(), gsbaState, frontEndState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -210,11 +210,11 @@ HWTEST2_F(CommandListTests, whenCommandListIsCreatedAndProgramExtendedPipeContro
|
||||||
}
|
}
|
||||||
|
|
||||||
using CommandListTestsReserveSize = Test<DeviceFixture>;
|
using CommandListTestsReserveSize = Test<DeviceFixture>;
|
||||||
HWTEST2_F(CommandListTestsReserveSize, givenCommandListWhenGetReserveSshSizeThen16slotSpaceReturned, IsAtLeastXeHpCore) {
|
HWTEST2_F(CommandListTestsReserveSize, givenCommandListWhenGetReserveSshSizeThen4PagesReturned, IsAtLeastXeHpCore) {
|
||||||
L0::CommandListCoreFamily<gfxCoreFamily> commandList(1u);
|
L0::CommandListCoreFamily<gfxCoreFamily> commandList(1u);
|
||||||
commandList.initialize(device, NEO::EngineGroupType::compute, 0u);
|
commandList.initialize(device, NEO::EngineGroupType::compute, 0u);
|
||||||
|
|
||||||
EXPECT_EQ(commandList.getReserveSshSize(), 16 * 2 * 2 * sizeof(typename FamilyType::RENDER_SURFACE_STATE));
|
EXPECT_EQ(commandList.getReserveSshSize(), 4 * MemoryConstants::pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
using CommandListAppendLaunchKernel = Test<ModuleFixture>;
|
using CommandListAppendLaunchKernel = Test<ModuleFixture>;
|
||||||
|
|
Loading…
Reference in New Issue