mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
Refactor obtaining IndirectHeaps
Change-Id: I9ad13f35daa18b0ff7ae760749cf4cdc7416b347 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
7c30e1ed4a
commit
277786d433
@@ -351,7 +351,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
|
||||
|
||||
if (blockQueue) {
|
||||
if (parentKernel) {
|
||||
size_t minSizeSSHForEM = HardwareCommandsHelper<GfxFamily>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||
size_t minSizeSSHForEM = HardwareCommandsHelper<GfxFamily>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *parentKernel);
|
||||
blockedCommandsData->surfaceStateHeapSizeEM = minSizeSSHForEM;
|
||||
}
|
||||
|
||||
@@ -508,7 +508,7 @@ void CommandQueueHw<GfxFamily>::processDeviceEnqueue(Kernel *parentKernel,
|
||||
TagNode<HwTimeStamps> *hwTimeStamps,
|
||||
PreemptionMode preemption,
|
||||
bool &blocking) {
|
||||
size_t minSizeSSHForEM = HardwareCommandsHelper<GfxFamily>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||
size_t minSizeSSHForEM = HardwareCommandsHelper<GfxFamily>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *parentKernel);
|
||||
|
||||
uint32_t taskCount = getGpgpuCommandStreamReceiver().peekTaskCount() + 1;
|
||||
devQueueHw->setupExecutionModelDispatch(getIndirectHeap(IndirectHeap::SURFACE_STATE, minSizeSSHForEM),
|
||||
|
||||
@@ -216,7 +216,7 @@ IndirectHeap &getIndirectHeap(CommandQueue &commandQueue, const MultiDispatchInf
|
||||
|
||||
if (Kernel *parentKernel = multiDispatchInfo.peekParentKernel()) {
|
||||
if (heapType == IndirectHeap::SURFACE_STATE) {
|
||||
expectedSize += HardwareCommandsHelper<GfxFamily>::template getSizeRequiredForExecutionModel<heapType>(*parentKernel);
|
||||
expectedSize += HardwareCommandsHelper<GfxFamily>::getSizeRequiredForExecutionModel(heapType, *parentKernel);
|
||||
} else //if (heapType == IndirectHeap::DYNAMIC_STATE || heapType == IndirectHeap::INDIRECT_OBJECT)
|
||||
{
|
||||
DeviceQueueHw<GfxFamily> *pDevQueue = castToObject<DeviceQueueHw<GfxFamily>>(commandQueue.getContext().getDefaultDeviceQueue());
|
||||
|
||||
@@ -95,6 +95,9 @@ class HardwareInterface {
|
||||
|
||||
static WALKER_TYPE<GfxFamily> *allocateWalkerSpace(LinearStream &commandStream,
|
||||
const Kernel &kernel);
|
||||
|
||||
static void obtainIndirectHeaps(CommandQueue &commandQueue, const MultiDispatchInfo &multiDispatchInfo,
|
||||
bool blockedQueue, IndirectHeap *&dsh, IndirectHeap *&ioh, IndirectHeap *&ssh);
|
||||
};
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -49,35 +49,13 @@ void HardwareInterface<GfxFamily>::dispatchWalker(
|
||||
}
|
||||
|
||||
// Allocate command stream and indirect heaps
|
||||
obtainIndirectHeaps(commandQueue, multiDispatchInfo, blockQueue, dsh, ioh, ssh);
|
||||
if (blockQueue) {
|
||||
using KCH = HardwareCommandsHelper<GfxFamily>;
|
||||
|
||||
constexpr static auto additionalAllocationSize = CSRequirements::csOverfetchSize;
|
||||
constexpr static auto allocationSize = MemoryConstants::pageSize64k - additionalAllocationSize;
|
||||
commandStream = new LinearStream();
|
||||
commandQueue.getGpgpuCommandStreamReceiver().ensureCommandBufferAllocation(*commandStream, allocationSize, additionalAllocationSize);
|
||||
|
||||
if (parentKernel) {
|
||||
uint32_t colorCalcSize = commandQueue.getContext().getDefaultDeviceQueue()->colorCalcStateSize;
|
||||
|
||||
commandQueue.allocateHeapMemory(
|
||||
IndirectHeap::DYNAMIC_STATE,
|
||||
commandQueue.getContext().getDefaultDeviceQueue()->getDshBuffer()->getUnderlyingBufferSize(),
|
||||
dsh);
|
||||
|
||||
dsh->getSpace(colorCalcSize);
|
||||
ioh = dsh;
|
||||
commandQueue.allocateHeapMemory(IndirectHeap::SURFACE_STATE,
|
||||
HardwareCommandsHelper<GfxFamily>::template getSizeRequiredForExecutionModel<
|
||||
IndirectHeap::SURFACE_STATE>(*parentKernel) +
|
||||
KCH::getTotalSizeRequiredSSH(multiDispatchInfo),
|
||||
ssh);
|
||||
} else {
|
||||
commandQueue.allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, KCH::getTotalSizeRequiredDSH(multiDispatchInfo), dsh);
|
||||
commandQueue.allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT, KCH::getTotalSizeRequiredIOH(multiDispatchInfo), ioh);
|
||||
commandQueue.allocateHeapMemory(IndirectHeap::SURFACE_STATE, KCH::getTotalSizeRequiredSSH(multiDispatchInfo), ssh);
|
||||
}
|
||||
|
||||
using UniqueIH = std::unique_ptr<IndirectHeap>;
|
||||
*blockedCommandsData = new KernelOperation(std::unique_ptr<LinearStream>(commandStream), UniqueIH(dsh), UniqueIH(ioh),
|
||||
UniqueIH(ssh), *commandQueue.getGpgpuCommandStreamReceiver().getInternalAllocationStorage());
|
||||
@@ -86,12 +64,6 @@ void HardwareInterface<GfxFamily>::dispatchWalker(
|
||||
}
|
||||
} else {
|
||||
commandStream = &commandQueue.getCS(0);
|
||||
if (parentKernel && (commandQueue.getIndirectHeap(IndirectHeap::SURFACE_STATE, 0).getUsed() > 0)) {
|
||||
commandQueue.releaseIndirectHeap(IndirectHeap::SURFACE_STATE);
|
||||
}
|
||||
dsh = &getIndirectHeap<GfxFamily, IndirectHeap::DYNAMIC_STATE>(commandQueue, multiDispatchInfo);
|
||||
ioh = &getIndirectHeap<GfxFamily, IndirectHeap::INDIRECT_OBJECT>(commandQueue, multiDispatchInfo);
|
||||
ssh = &getIndirectHeap<GfxFamily, IndirectHeap::SURFACE_STATE>(commandQueue, multiDispatchInfo);
|
||||
}
|
||||
|
||||
TimestampPacketHelper::programCsrDependencies<GfxFamily>(*commandStream, csrDependencies);
|
||||
@@ -211,4 +183,45 @@ void HardwareInterface<GfxFamily>::dispatchWalker(
|
||||
dispatchProfilingPerfEndCommands(hwTimeStamps, hwPerfCounter, commandStream, commandQueue);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void HardwareInterface<GfxFamily>::obtainIndirectHeaps(CommandQueue &commandQueue, const MultiDispatchInfo &multiDispatchInfo,
|
||||
bool blockedQueue, IndirectHeap *&dsh, IndirectHeap *&ioh, IndirectHeap *&ssh) {
|
||||
auto parentKernel = multiDispatchInfo.peekParentKernel();
|
||||
|
||||
if (blockedQueue) {
|
||||
size_t dshSize = 0;
|
||||
size_t colorCalcSize = 0;
|
||||
size_t sshSize = HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
||||
bool iohEqualsDsh = false;
|
||||
|
||||
if (parentKernel) {
|
||||
dshSize = commandQueue.getContext().getDefaultDeviceQueue()->getDshBuffer()->getUnderlyingBufferSize();
|
||||
sshSize += HardwareCommandsHelper<GfxFamily>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *parentKernel);
|
||||
iohEqualsDsh = true;
|
||||
colorCalcSize = static_cast<size_t>(commandQueue.getContext().getDefaultDeviceQueue()->colorCalcStateSize);
|
||||
} else {
|
||||
dshSize = HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredDSH(multiDispatchInfo);
|
||||
}
|
||||
|
||||
commandQueue.allocateHeapMemory(IndirectHeap::DYNAMIC_STATE, dshSize, dsh);
|
||||
dsh->getSpace(colorCalcSize);
|
||||
|
||||
commandQueue.allocateHeapMemory(IndirectHeap::SURFACE_STATE, sshSize, ssh);
|
||||
|
||||
if (iohEqualsDsh) {
|
||||
ioh = dsh;
|
||||
} else {
|
||||
commandQueue.allocateHeapMemory(IndirectHeap::INDIRECT_OBJECT,
|
||||
HardwareCommandsHelper<GfxFamily>::getTotalSizeRequiredIOH(multiDispatchInfo), ioh);
|
||||
}
|
||||
} else {
|
||||
if (parentKernel && (commandQueue.getIndirectHeap(IndirectHeap::SURFACE_STATE, 0).getUsed() > 0)) {
|
||||
commandQueue.releaseIndirectHeap(IndirectHeap::SURFACE_STATE);
|
||||
}
|
||||
dsh = &getIndirectHeap<GfxFamily, IndirectHeap::DYNAMIC_STATE>(commandQueue, multiDispatchInfo);
|
||||
ioh = &getIndirectHeap<GfxFamily, IndirectHeap::INDIRECT_OBJECT>(commandQueue, multiDispatchInfo);
|
||||
ssh = &getIndirectHeap<GfxFamily, IndirectHeap::SURFACE_STATE>(commandQueue, multiDispatchInfo);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -158,8 +158,7 @@ struct HardwareCommandsHelper : public PerThreadDataHelper {
|
||||
static size_t getTotalSizeRequiredSSH(
|
||||
const MultiDispatchInfo &multiDispatchInfo);
|
||||
|
||||
template <IndirectHeap::Type heapType>
|
||||
static size_t getSizeRequiredForExecutionModel(const Kernel &kernel) {
|
||||
static size_t getSizeRequiredForExecutionModel(IndirectHeap::Type heapType, const Kernel &kernel) {
|
||||
typedef typename GfxFamily::BINDING_TABLE_STATE BINDING_TABLE_STATE;
|
||||
|
||||
size_t totalSize = 0;
|
||||
|
||||
@@ -509,7 +509,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, DeviceQueueHwWithKernel, setupIndirectState) {
|
||||
auto dsh = devQueueHw->getIndirectHeap(IndirectHeap::DYNAMIC_STATE);
|
||||
ASSERT_NE(nullptr, dsh);
|
||||
|
||||
size_t surfaceStateHeapSize = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(const_cast<const Kernel &>(*pKernel));
|
||||
size_t surfaceStateHeapSize = HardwareCommandsHelper<FamilyType>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, const_cast<const Kernel &>(*pKernel));
|
||||
|
||||
auto ssh = new IndirectHeap(alignedMalloc(surfaceStateHeapSize, MemoryConstants::pageSize), surfaceStateHeapSize);
|
||||
auto usedBeforeSSH = ssh->getUsed();
|
||||
@@ -539,7 +539,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, DeviceQueueHwWithKernel, setupIndirectStateSetsCorre
|
||||
auto dsh = devQueueHw->getIndirectHeap(IndirectHeap::DYNAMIC_STATE);
|
||||
ASSERT_NE(nullptr, dsh);
|
||||
|
||||
size_t surfaceStateHeapSize = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(const_cast<const Kernel &>(*pKernel));
|
||||
size_t surfaceStateHeapSize = HardwareCommandsHelper<FamilyType>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, const_cast<const Kernel &>(*pKernel));
|
||||
|
||||
auto ssh = new IndirectHeap(alignedMalloc(surfaceStateHeapSize, MemoryConstants::pageSize), surfaceStateHeapSize);
|
||||
|
||||
@@ -569,7 +569,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, DeviceQueueHwWithKernel, setupIndirectStateSetsCorre
|
||||
auto dsh = devQueueHw->getIndirectHeap(IndirectHeap::DYNAMIC_STATE);
|
||||
ASSERT_NE(nullptr, dsh);
|
||||
|
||||
size_t surfaceStateHeapSize = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(const_cast<const Kernel &>(*pKernel));
|
||||
size_t surfaceStateHeapSize = HardwareCommandsHelper<FamilyType>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, const_cast<const Kernel &>(*pKernel));
|
||||
|
||||
auto ssh = new IndirectHeap(alignedMalloc(surfaceStateHeapSize, MemoryConstants::pageSize), surfaceStateHeapSize);
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelDispatchTest, givenParentKernelWhenQueue
|
||||
EXPECT_LE(pKernel->getKernelInfo().heapInfo.pKernelHeader->SurfaceStateHeapSize, ssh.getMaxAvailableSpace());
|
||||
|
||||
size_t minRequiredSize = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo);
|
||||
size_t minRequiredSizeForEM = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*pKernel);
|
||||
size_t minRequiredSizeForEM = HardwareCommandsHelper<FamilyType>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *pKernel);
|
||||
|
||||
EXPECT_LE(minRequiredSize + minRequiredSizeForEM, ssh.getMaxAvailableSpace());
|
||||
}
|
||||
@@ -176,7 +176,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelDispatchTest, givenParentKernelWhenQueue
|
||||
ASSERT_NE(nullptr, blockedCommandsData);
|
||||
|
||||
size_t minRequiredSize = HardwareCommandsHelper<FamilyType>::getTotalSizeRequiredSSH(multiDispatchInfo) + UnitTestHelper<FamilyType>::getDefaultSshUsage();
|
||||
size_t minRequiredSizeForEM = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*pKernel);
|
||||
size_t minRequiredSizeForEM = HardwareCommandsHelper<FamilyType>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *pKernel);
|
||||
|
||||
size_t sshUsed = blockedCommandsData->ssh->getUsed();
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ExecutionModelSchedulerFixture, dispatchScheduler) {
|
||||
|
||||
EXPECT_NE(nullptr, executionModelDsh);
|
||||
|
||||
size_t minRequiredSizeForSchedulerSSH = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||
size_t minRequiredSizeForSchedulerSSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *parentKernel);
|
||||
// Setup heaps in pCmdQ
|
||||
LinearStream &commandStream = getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*pCmdQ, false, false, &scheduler);
|
||||
pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, minRequiredSizeForSchedulerSSH);
|
||||
@@ -171,7 +171,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ExecutionModelSchedulerFixture, dispatchSchedulerDoe
|
||||
DeviceQueueHw<FamilyType> *pDevQueueHw = castToObject<DeviceQueueHw<FamilyType>>(pDevQueue);
|
||||
SchedulerKernel &scheduler = pDevice->getExecutionEnvironment()->getBuiltIns()->getSchedulerKernel(*context);
|
||||
|
||||
size_t minRequiredSizeForSchedulerSSH = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||
size_t minRequiredSizeForSchedulerSSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *parentKernel);
|
||||
// Setup heaps in pCmdQ
|
||||
getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*pCmdQ, false, false, &scheduler);
|
||||
pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, minRequiredSizeForSchedulerSSH);
|
||||
|
||||
@@ -94,7 +94,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenLockedEMcritca
|
||||
|
||||
dsh->getSpace(mockDevQueue.getDshOffset());
|
||||
|
||||
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *parentKernel);
|
||||
|
||||
auto cmdStreamAllocation = device->getMemoryManager()->allocateGraphicsMemoryWithProperties({4096, GraphicsAllocation::AllocationType::COMMAND_BUFFER});
|
||||
KernelOperation *blockedCommandData = new KernelOperation(std::unique_ptr<LinearStream>(new LinearStream(cmdStreamAllocation)),
|
||||
@@ -163,7 +163,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenParentKernelWh
|
||||
std::unique_ptr<IndirectHeap>(ssh),
|
||||
*pCmdQ->getGpgpuCommandStreamReceiver().getInternalAllocationStorage());
|
||||
|
||||
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *parentKernel);
|
||||
|
||||
blockedCommandData->surfaceStateHeapSizeEM = minSizeSSHForEM;
|
||||
PreemptionMode preemptionMode = device->getPreemptionMode();
|
||||
@@ -206,7 +206,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenParentKernelWh
|
||||
std::unique_ptr<IndirectHeap>(ssh),
|
||||
*pCmdQ->getGpgpuCommandStreamReceiver().getInternalAllocationStorage());
|
||||
|
||||
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *parentKernel);
|
||||
|
||||
blockedCommandData->surfaceStateHeapSizeEM = minSizeSSHForEM;
|
||||
PreemptionMode preemptionMode = device->getPreemptionMode();
|
||||
@@ -246,7 +246,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenBlockedParentK
|
||||
std::unique_ptr<IndirectHeap>(ssh),
|
||||
*pCmdQ->getGpgpuCommandStreamReceiver().getInternalAllocationStorage());
|
||||
|
||||
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *parentKernel);
|
||||
|
||||
blockedCommandData->surfaceStateHeapSizeEM = minSizeSSHForEM;
|
||||
PreemptionMode preemptionMode = device->getPreemptionMode();
|
||||
@@ -289,7 +289,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenParentKernelWh
|
||||
std::unique_ptr<IndirectHeap>(ssh),
|
||||
*pCmdQ->getGpgpuCommandStreamReceiver().getInternalAllocationStorage());
|
||||
|
||||
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *parentKernel);
|
||||
|
||||
blockedCommandData->surfaceStateHeapSizeEM = minSizeSSHForEM;
|
||||
PreemptionMode preemptionMode = device->getPreemptionMode();
|
||||
@@ -315,7 +315,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenUsedCommandQue
|
||||
|
||||
MockCommandQueue cmdQ(context, device, properties);
|
||||
|
||||
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *parentKernel);
|
||||
|
||||
size_t heapSize = 20;
|
||||
|
||||
@@ -369,7 +369,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenNotUsedSSHWhen
|
||||
parentKernel->createReflectionSurface();
|
||||
context->setDefaultDeviceQueue(&mockDevQueue);
|
||||
|
||||
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||
size_t minSizeSSHForEM = HardwareCommandsHelper<FamilyType>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *parentKernel);
|
||||
|
||||
size_t heapSize = 20;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ BDWTEST_F(BdwSchedulerTest, givenCallToDispatchSchedulerWhenPipeControlWithCSSta
|
||||
DeviceQueueHw<FamilyType> *pDevQueueHw = castToObject<DeviceQueueHw<FamilyType>>(pDevQueue);
|
||||
SchedulerKernel &scheduler = pDevice->getExecutionEnvironment()->getBuiltIns()->getSchedulerKernel(*context);
|
||||
|
||||
size_t minRequiredSizeForSchedulerSSH = HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*parentKernel);
|
||||
size_t minRequiredSizeForSchedulerSSH = HardwareCommandsHelper<FamilyType>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *parentKernel);
|
||||
|
||||
// Setup heaps in pCmdQ
|
||||
LinearStream &commandStream = getCommandStream<FamilyType, CL_COMMAND_NDRANGE_KERNEL>(*pCmdQ, false, false, &scheduler);
|
||||
|
||||
@@ -1136,7 +1136,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelCommandsFromBinaryTest, getSizeRequiredF
|
||||
|
||||
totalSize = alignUp(totalSize, BINDING_TABLE_STATE::SURFACESTATEPOINTER_ALIGN_SIZE);
|
||||
|
||||
EXPECT_EQ(totalSize, HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::SURFACE_STATE>(*pKernel));
|
||||
EXPECT_EQ(totalSize, HardwareCommandsHelper<FamilyType>::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *pKernel));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1150,7 +1150,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelCommandsFromBinaryTest, getSizeRequiredF
|
||||
auto &scheduler = builtIns.getSchedulerKernel(*pContext);
|
||||
size_t totalSize = HardwareCommandsHelper<FamilyType>::getSizeRequiredIOH(scheduler);
|
||||
|
||||
EXPECT_EQ(totalSize, HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::INDIRECT_OBJECT>(*pKernel));
|
||||
EXPECT_EQ(totalSize, HardwareCommandsHelper<FamilyType>::getSizeRequiredForExecutionModel(IndirectHeap::INDIRECT_OBJECT, *pKernel));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1162,7 +1162,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelCommandsFromBinaryTest, getSizeRequiredF
|
||||
|
||||
size_t totalSize = 0;
|
||||
|
||||
EXPECT_EQ(totalSize, HardwareCommandsHelper<FamilyType>::template getSizeRequiredForExecutionModel<IndirectHeap::GENERAL_STATE>(*pKernel));
|
||||
EXPECT_EQ(totalSize, HardwareCommandsHelper<FamilyType>::getSizeRequiredForExecutionModel(IndirectHeap::GENERAL_STATE, *pKernel));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user