Fix execution of cooperative kernels on multi-tile device

Add flag for forcing execution of kernels on single tile
Force cooperative kernels to use only single tile

Related-to: NEO-6729
Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
This commit is contained in:
Naklicki, Mateusz
2022-11-15 13:48:45 +00:00
committed by Compute-Runtime-Automation
parent 359b9278b8
commit 914939c377
15 changed files with 182 additions and 62 deletions

View File

@@ -1417,8 +1417,8 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, MultiTileCommandListAppendLaunchKernelXeHpCoreTest,
EXPECT_EQ(4u, commandList->partitionCount);
}
HWTEST2_F(MultiTileCommandListAppendLaunchKernelXeHpCoreTest, givenCooperativeKernelWhenAppendingKernelsThenDoNotUseImplicitScaling, IsAtLeastXeHpCore) {
ze_group_count_t groupCount{1, 1, 1};
HWTEST2_F(MultiTileCommandListAppendLaunchKernelXeHpCoreTest, givenCooperativeKernelWhenAppendingKernelsThenSetProperPartitionSize, IsAtLeastXeHpCore) {
ze_group_count_t groupCount{16, 1, 1};
auto commandListWithNonCooperativeKernel = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
auto result = commandListWithNonCooperativeKernel->initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
@@ -1434,6 +1434,7 @@ HWTEST2_F(MultiTileCommandListAppendLaunchKernelXeHpCoreTest, givenCooperativeKe
auto itorWalker = find<typename FamilyType::WALKER_TYPE *>(cmdList.begin(), cmdList.end());
auto cmd = genCmdCast<typename FamilyType::WALKER_TYPE *>(*itorWalker);
EXPECT_TRUE(cmd->getWorkloadPartitionEnable());
EXPECT_EQ(4u, cmd->getPartitionSize());
auto commandListWithCooperativeKernel = std::make_unique<WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>>();
result = commandListWithCooperativeKernel->initialize(device, NEO::EngineGroupType::RenderCompute, 0u);
@@ -1445,11 +1446,12 @@ HWTEST2_F(MultiTileCommandListAppendLaunchKernelXeHpCoreTest, givenCooperativeKe
sizeAfter = commandListWithCooperativeKernel->commandContainer.getCommandStream()->getUsed();
cmdList.clear();
ASSERT_TRUE(FamilyType::PARSE::parseCommandBuffer(
cmdList, ptrOffset(commandListWithNonCooperativeKernel->commandContainer.getCommandStream()->getCpuBase(), sizeBefore), sizeAfter - sizeBefore));
cmdList, ptrOffset(commandListWithCooperativeKernel->commandContainer.getCommandStream()->getCpuBase(), sizeBefore), sizeAfter - sizeBefore));
itorWalker = find<typename FamilyType::WALKER_TYPE *>(cmdList.begin(), cmdList.end());
cmd = genCmdCast<typename FamilyType::WALKER_TYPE *>(*itorWalker);
EXPECT_TRUE(cmd->getWorkloadPartitionEnable());
EXPECT_EQ(16u, cmd->getPartitionSize());
}
HWTEST2_F(MultiTileCommandListAppendLaunchKernelXeHpCoreTest,