mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
Introduce MultiDeviceKernel class
Related-To: NEO-5001 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
71940061b8
commit
04eca48ee0
@@ -81,6 +81,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenLockedEMcritca
|
||||
|
||||
cl_queue_properties properties[3] = {0};
|
||||
MockParentKernel *parentKernel = MockParentKernel::create(*context);
|
||||
MultiDeviceKernel multiDeviceKernel(parentKernel);
|
||||
MockDeviceQueueHwWithCriticalSectionRelease<FamilyType> mockDevQueue(context, device, properties[0]);
|
||||
parentKernel->createReflectionSurface();
|
||||
context->setDefaultDeviceQueue(&mockDevQueue);
|
||||
@@ -113,7 +114,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenLockedEMcritca
|
||||
|
||||
EXPECT_EQ(mockDevQueue.maxCounter, mockDevQueue.criticalSectioncheckCounter);
|
||||
delete cmdComputeKernel;
|
||||
delete parentKernel;
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenParentKernelWhenCommandIsSubmittedThenPassedDshIsUsed) {
|
||||
@@ -121,6 +121,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenParentKernelWh
|
||||
|
||||
cl_queue_properties properties[3] = {0};
|
||||
MockParentKernel *parentKernel = MockParentKernel::create(*context);
|
||||
MultiDeviceKernel multiDeviceKernel(parentKernel);
|
||||
MockDeviceQueueHwWithCriticalSectionRelease<FamilyType> mockDevQueue(context, device, properties[0]);
|
||||
parentKernel->createReflectionSurface();
|
||||
context->setDefaultDeviceQueue(&mockDevQueue);
|
||||
@@ -176,7 +177,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenParentKernelWh
|
||||
EXPECT_EQ(usedDSHAfterSubmit, usedDSHAfterSubmit);
|
||||
|
||||
delete cmdComputeKernel;
|
||||
delete parentKernel;
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenParentKernelWhenCommandIsSubmittedThenIndirectStateAndEMCleanupSectionIsSetup) {
|
||||
@@ -184,6 +184,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenParentKernelWh
|
||||
|
||||
cl_queue_properties properties[3] = {0};
|
||||
MockParentKernel *parentKernel = MockParentKernel::create(*context);
|
||||
MultiDeviceKernel multiDeviceKernel(parentKernel);
|
||||
MockDeviceQueueHwWithCriticalSectionRelease<FamilyType> mockDevQueue(context, device, properties[0]);
|
||||
parentKernel->createReflectionSurface();
|
||||
context->setDefaultDeviceQueue(&mockDevQueue);
|
||||
@@ -216,7 +217,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenParentKernelWh
|
||||
EXPECT_TRUE(mockDevQueue.cleanupSectionAdded);
|
||||
|
||||
delete cmdComputeKernel;
|
||||
delete parentKernel;
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenBlockedParentKernelWithProfilingWhenCommandIsSubmittedThenEMCleanupSectionsSetsCompleteTimestamp) {
|
||||
@@ -224,6 +224,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenBlockedParentK
|
||||
|
||||
cl_queue_properties properties[3] = {0};
|
||||
MockParentKernel *parentKernel = MockParentKernel::create(*context);
|
||||
MultiDeviceKernel multiDeviceKernel(parentKernel);
|
||||
MockDeviceQueueHwWithCriticalSectionRelease<FamilyType> mockDevQueue(context, device, properties[0]);
|
||||
parentKernel->createReflectionSurface();
|
||||
context->setDefaultDeviceQueue(&mockDevQueue);
|
||||
@@ -256,7 +257,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenBlockedParentK
|
||||
EXPECT_EQ(mockDevQueue.timestampAddedInCleanupSection, timestamp->tagForCpuAccess);
|
||||
|
||||
delete cmdComputeKernel;
|
||||
delete parentKernel;
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenParentKernelWhenCommandIsSubmittedThenSchedulerIsDispatched) {
|
||||
@@ -264,6 +264,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenParentKernelWh
|
||||
|
||||
cl_queue_properties properties[3] = {0};
|
||||
MockParentKernel *parentKernel = MockParentKernel::create(*context);
|
||||
MultiDeviceKernel multiDeviceKernel(parentKernel);
|
||||
MockDeviceQueueHwWithCriticalSectionRelease<FamilyType> mockDevQueue(context, device, properties[0]);
|
||||
parentKernel->createReflectionSurface();
|
||||
context->setDefaultDeviceQueue(&mockDevQueue);
|
||||
@@ -294,7 +295,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenParentKernelWh
|
||||
EXPECT_TRUE(mockDevQueue.schedulerDispatched);
|
||||
|
||||
delete cmdComputeKernel;
|
||||
delete parentKernel;
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenUsedCommandQueueHeapsWhenParentKernelIsSubmittedThenQueueHeapsAreNotUsed) {
|
||||
@@ -302,6 +302,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenUsedCommandQue
|
||||
|
||||
cl_queue_properties properties[3] = {0};
|
||||
MockParentKernel *parentKernel = MockParentKernel::create(*context);
|
||||
MultiDeviceKernel multiDeviceKernel(parentKernel);
|
||||
MockDeviceQueueHw<FamilyType> mockDevQueue(context, device, properties[0]);
|
||||
parentKernel->createReflectionSurface();
|
||||
context->setDefaultDeviceQueue(&mockDevQueue);
|
||||
@@ -350,7 +351,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenUsedCommandQue
|
||||
EXPECT_EQ(intialSshUsed, queueSsh.getUsed());
|
||||
|
||||
delete cmdComputeKernel;
|
||||
delete parentKernel;
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenNotUsedSSHWhenParentKernelIsSubmittedThenExistingSSHIsUsed) {
|
||||
@@ -358,6 +358,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenNotUsedSSHWhen
|
||||
|
||||
cl_queue_properties properties[3] = {0};
|
||||
MockParentKernel *parentKernel = MockParentKernel::create(*context);
|
||||
MultiDeviceKernel multiDeviceKernel(parentKernel);
|
||||
MockDeviceQueueHw<FamilyType> mockDevQueue(context, device, properties[0]);
|
||||
parentKernel->createReflectionSurface();
|
||||
context->setDefaultDeviceQueue(&mockDevQueue);
|
||||
@@ -395,14 +396,14 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenNotUsedSSHWhen
|
||||
EXPECT_EQ(sshBuffer, newSshBuffer);
|
||||
|
||||
delete cmdComputeKernel;
|
||||
delete parentKernel;
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, givenBlockedCommandQueueWhenDispatchWalkerIsCalledThenHeapsHaveProperSizes) {
|
||||
REQUIRE_DEVICE_ENQUEUE_OR_SKIP(device);
|
||||
|
||||
cl_queue_properties properties[3] = {0};
|
||||
std::unique_ptr<MockParentKernel> parentKernel(MockParentKernel::create(*context));
|
||||
auto parentKernel = MockParentKernel::create(*context);
|
||||
MultiDeviceKernel multiDeviceKernel(parentKernel);
|
||||
|
||||
MockDeviceQueueHw<FamilyType> mockDevQueue(context, device, properties[0]);
|
||||
parentKernel->createReflectionSurface();
|
||||
@@ -412,10 +413,10 @@ 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(device, parentKernel.get(), 1, workItems, nullptr, globalOffsets);
|
||||
DispatchInfo dispatchInfo(device, parentKernel, 1, workItems, nullptr, globalOffsets);
|
||||
dispatchInfo.setNumberOfWorkgroups({1, 1, 1});
|
||||
dispatchInfo.setTotalNumberOfWorkgroups({1, 1, 1});
|
||||
MultiDispatchInfo multiDispatchInfo(parentKernel.get());
|
||||
MultiDispatchInfo multiDispatchInfo(parentKernel);
|
||||
multiDispatchInfo.push(dispatchInfo);
|
||||
HardwareInterface<FamilyType>::dispatchWalker(
|
||||
*pCmdQ,
|
||||
|
||||
Reference in New Issue
Block a user