Store ClDevice in DispatchInfo

Related-To: NEO-5001
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-11-16 12:08:30 +01:00
committed by Compute-Runtime-Automation
parent b848f20abc
commit 97119f5f3e
56 changed files with 335 additions and 317 deletions

View File

@@ -59,7 +59,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, givenParentKernelWhenEnqueu
uint32_t colorCalcSize = DeviceQueue::colorCalcStateSize;
EXPECT_EQ(colorCalcSize, executionModelDSHUsedBefore);
MockMultiDispatchInfo multiDispatchInfo(pKernel);
MockMultiDispatchInfo multiDispatchInfo(pClDevice, pKernel);
auto graphicsAllocation = pKernel->getKernelInfo().getGraphicsAllocation();
auto kernelIsaAddress = graphicsAllocation->getGpuAddressToPatch();
@@ -253,7 +253,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, givenParentKernelWhenEnqueu
uint32_t colorCalcSize = DeviceQueue::colorCalcStateSize;
EXPECT_EQ(colorCalcSize, executionModelDSHUsedBefore);
MockMultiDispatchInfo multiDispatchInfo(pKernel);
MockMultiDispatchInfo multiDispatchInfo(pClDevice, pKernel);
pCmdQ->enqueueKernel(pKernel, 1, globalOffsets, workItems, workItems, 0, nullptr, nullptr);
@@ -273,7 +273,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, givenParentKernelAndNotUsed
const size_t workItems[3] = {1, 1, 1};
pKernel->createReflectionSurface();
MockMultiDispatchInfo multiDispatchInfo(pKernel);
MockMultiDispatchInfo multiDispatchInfo(pClDevice, pKernel);
auto ssh = &getIndirectHeap<FamilyType, IndirectHeap::SURFACE_STATE>(*pCmdQ, multiDispatchInfo);
ssh->replaceBuffer(ssh->getCpuBase(), ssh->getMaxAvailableSpace());
@@ -299,7 +299,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, givenParentKernelWhenEnqueu
size_t parentKernelSSHSize = pKernel->getSurfaceStateHeapSize();
MockMultiDispatchInfo multiDispatchInfo(pKernel);
MockMultiDispatchInfo multiDispatchInfo(pClDevice, pKernel);
auto ssh = &getIndirectHeap<FamilyType, IndirectHeap::SURFACE_STATE>(*pCmdQ, multiDispatchInfo);
// prealign the ssh so that it won't need to be realigned in enqueueKernel
@@ -355,7 +355,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, givenParentKernelWhenEnqueu
const size_t globalOffsets[3] = {0, 0, 0};
const size_t workItems[3] = {1, 1, 1};
MockMultiDispatchInfo multiDispatchInfo(pKernel);
MockMultiDispatchInfo multiDispatchInfo(pClDevice, pKernel);
pCmdQ->enqueueKernel(pKernel, 1, globalOffsets, workItems, workItems, 0, nullptr, nullptr);
EXPECT_NE(nullptr, pKernel->getKernelReflectionSurface());
@@ -366,7 +366,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, givenBlockedQueueWhenParent
const size_t workItems[3] = {1, 1, 1};
cl_queue_properties properties[3] = {0};
MockMultiDispatchInfo multiDispatchInfo(pKernel);
MockMultiDispatchInfo multiDispatchInfo(pClDevice, pKernel);
MockDeviceQueueHw<FamilyType> mockDevQueue(context, pClDevice, properties[0]);
context->setDefaultDeviceQueue(&mockDevQueue);
@@ -391,7 +391,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelEnqueueTest, givenNonBlockedQueueWhenPar
const size_t globalOffsets[3] = {0, 0, 0};
const size_t workItems[3] = {1, 1, 1};
MockMultiDispatchInfo multiDispatchInfo(pKernel);
MockMultiDispatchInfo multiDispatchInfo(pClDevice, pKernel);
int32_t executionStamp = 0;
auto mockCSR = new MockCsrBase<FamilyType>(executionStamp, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());

View File

@@ -41,7 +41,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelDispatchTest, givenParentKernelWhenQueue
size_t executionModelDSHUsedBefore = pDevQueueHw->getIndirectHeap(IndirectHeap::DYNAMIC_STATE)->getUsed();
DispatchInfo dispatchInfo(pKernel, 1, workItems, nullptr, globalOffsets);
DispatchInfo dispatchInfo(pClDevice, pKernel, 1, workItems, nullptr, globalOffsets);
MultiDispatchInfo multiDispatchInfo(pKernel);
multiDispatchInfo.push(dispatchInfo);
HardwareInterface<FamilyType>::dispatchWalker(
@@ -65,7 +65,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelDispatchTest, givenParentKernelWhenQueue
HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelDispatchTest, givenParentKernelWhenDynamicStateHeapIsRequestedThenDeviceQueueHeapIsReturned) {
DeviceQueueHw<FamilyType> *pDevQueueHw = castToObject<DeviceQueueHw<FamilyType>>(pDevQueue);
MockMultiDispatchInfo multiDispatchInfo(pKernel);
MockMultiDispatchInfo multiDispatchInfo(pClDevice, pKernel);
auto ish = &getIndirectHeap<FamilyType, IndirectHeap::DYNAMIC_STATE>(*pCmdQ, multiDispatchInfo);
auto ishOfDevQueue = pDevQueueHw->getIndirectHeap(IndirectHeap::DYNAMIC_STATE);
@@ -75,7 +75,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelDispatchTest, givenParentKernelWhenDynam
HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelDispatchTest, givenParentKernelWhenIndirectObjectHeapIsRequestedThenDeviceQueueDSHIsReturned) {
DeviceQueueHw<FamilyType> *pDevQueueHw = castToObject<DeviceQueueHw<FamilyType>>(pDevQueue);
MockMultiDispatchInfo multiDispatchInfo(pKernel);
MockMultiDispatchInfo multiDispatchInfo(pClDevice, pKernel);
auto ioh = &getIndirectHeap<FamilyType, IndirectHeap::INDIRECT_OBJECT>(*pCmdQ, multiDispatchInfo);
auto dshOfDevQueue = pDevQueueHw->getIndirectHeap(IndirectHeap::DYNAMIC_STATE);
@@ -87,11 +87,11 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelDispatchTest, givenParentKernelWhenQueue
const size_t globalOffsets[3] = {0, 0, 0};
const size_t workItems[3] = {1, 1, 1};
MockMultiDispatchInfo multiDispatchInfo(pKernel);
MockMultiDispatchInfo multiDispatchInfo(pClDevice, pKernel);
auto &ioh = pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 0u);
DispatchInfo dispatchInfo(pKernel, 1, workItems, nullptr, globalOffsets);
DispatchInfo dispatchInfo(pClDevice, pKernel, 1, workItems, nullptr, globalOffsets);
multiDispatchInfo.push(dispatchInfo);
HardwareInterface<FamilyType>::dispatchWalker(
*pCmdQ,
@@ -113,8 +113,8 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelDispatchTest, givenParentKernelWhenQueue
const size_t globalOffsets[3] = {0, 0, 0};
const size_t workItems[3] = {1, 1, 1};
MockMultiDispatchInfo multiDispatchInfo(pKernel);
DispatchInfo dispatchInfo(pKernel, 1, workItems, nullptr, globalOffsets);
MockMultiDispatchInfo multiDispatchInfo(pClDevice, pKernel);
DispatchInfo dispatchInfo(pClDevice, pKernel, 1, workItems, nullptr, globalOffsets);
multiDispatchInfo.push(dispatchInfo);
HardwareInterface<FamilyType>::dispatchWalker(
*pCmdQ,
@@ -147,7 +147,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, ParentKernelDispatchTest, givenParentKernelWhenQueue
MultiDispatchInfo multiDispatchInfo(pKernel);
DispatchInfo dispatchInfo(pKernel, 1, workItems, nullptr, globalOffsets);
DispatchInfo dispatchInfo(pClDevice, pKernel, 1, workItems, nullptr, globalOffsets);
multiDispatchInfo.push(dispatchInfo);
HardwareInterface<FamilyType>::dispatchWalker(
*pCmdQ,
@@ -192,7 +192,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandStreamFixture, GivenDispatchInfoW
if (device->areOcl21FeaturesSupported()) {
MockParentKernel *mockParentKernel = MockParentKernel::create(*context);
DispatchInfo dispatchInfo(mockParentKernel, 1, Vec3<size_t>{24, 1, 1}, Vec3<size_t>{24, 1, 1}, Vec3<size_t>{0, 0, 0});
DispatchInfo dispatchInfo(device, mockParentKernel, 1, Vec3<size_t>{24, 1, 1}, Vec3<size_t>{24, 1, 1}, Vec3<size_t>{0, 0, 0});
MultiDispatchInfo multiDispatchInfo(mockParentKernel);
size_t size = EnqueueOperation<FamilyType>::getSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, false, false, *pCmdQ, mockParentKernel);
@@ -256,7 +256,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, MockParentKernelDispatch, GivenBlockedQueueWhenParen
const size_t globalOffsets[3] = {0, 0, 0};
const size_t workItems[3] = {1, 1, 1};
DispatchInfo dispatchInfo(mockParentKernel, 1, workItems, nullptr, globalOffsets);
DispatchInfo dispatchInfo(pClDevice, mockParentKernel, 1, workItems, nullptr, globalOffsets);
MultiDispatchInfo multiDispatchInfo(mockParentKernel);
multiDispatchInfo.push(dispatchInfo);
HardwareInterface<FamilyType>::dispatchWalker(
@@ -288,7 +288,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, MockParentKernelDispatch, GivenParentKernelWhenDispa
const size_t globalOffsets[3] = {0, 0, 0};
const size_t workItems[3] = {1, 1, 1};
DispatchInfo dispatchInfo(mockParentKernel, 1, workItems, nullptr, globalOffsets);
DispatchInfo dispatchInfo(pClDevice, mockParentKernel, 1, workItems, nullptr, globalOffsets);
MultiDispatchInfo multiDispatchInfo(mockParentKernel);
multiDispatchInfo.push(dispatchInfo);
HardwareInterface<FamilyType>::dispatchWalker(
@@ -345,7 +345,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, MockParentKernelDispatch, GivenUsedSSHHeapWhenParent
// If parent is not using SSH, then heap obtained has zero usage and the same buffer
ASSERT_EQ(0u, mockParentKernel->getKernelInfo().heapInfo.SurfaceStateHeapSize);
DispatchInfo dispatchInfo(mockParentKernel, 1, workItems, nullptr, globalOffsets);
DispatchInfo dispatchInfo(pClDevice, mockParentKernel, 1, workItems, nullptr, globalOffsets);
MultiDispatchInfo multiDispatchInfo(mockParentKernel);
multiDispatchInfo.push(dispatchInfo);
HardwareInterface<FamilyType>::dispatchWalker(
@@ -380,7 +380,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, MockParentKernelDispatch, GivenNotUsedSSHHeapWhenPar
auto *bufferMemory = ssh.getCpuBase();
DispatchInfo dispatchInfo(mockParentKernel, 1, workItems, nullptr, globalOffsets);
DispatchInfo dispatchInfo(pClDevice, mockParentKernel, 1, workItems, nullptr, globalOffsets);
MultiDispatchInfo multiDispatchInfo;
multiDispatchInfo.push(dispatchInfo);
HardwareInterface<FamilyType>::dispatchWalker(

View File

@@ -412,7 +412,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenBlockedCommand
const size_t globalOffsets[3] = {0, 0, 0};
const size_t workItems[3] = {1, 1, 1};
DispatchInfo dispatchInfo(parentKernel.get(), 1, workItems, nullptr, globalOffsets);
DispatchInfo dispatchInfo(device, parentKernel.get(), 1, workItems, nullptr, globalOffsets);
MultiDispatchInfo multiDispatchInfo(parentKernel.get());
multiDispatchInfo.push(dispatchInfo);
HardwareInterface<FamilyType>::dispatchWalker(