refactor: add walker pointer to command list launch parameters

Related-To: NEO-10062

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2024-02-14 23:22:08 +00:00
committed by Compute-Runtime-Automation
parent 4d159bd06c
commit dce595ba9d
3 changed files with 27 additions and 0 deletions

View File

@@ -335,6 +335,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
};
NEO::EncodeDispatchKernel<GfxFamily>::encodeCommon(commandContainer, dispatchKernelArgs);
launchParams.outWalker = dispatchKernelArgs.outWalkerPtr;
if (!this->isFlushTaskSubmissionEnabled) {
this->containsStatelessUncachedResource = dispatchKernelArgs.requiresUncachedMocs;

View File

@@ -13,6 +13,7 @@
namespace L0 {
struct CmdListKernelLaunchParams {
void *outWalker = nullptr;
NEO::RequiredPartitionDim requiredPartitionDim = NEO::RequiredPartitionDim::none;
NEO::RequiredDispatchWalkOrder requiredDispatchWalkOrder = NEO::RequiredDispatchWalkOrder::none;
uint32_t additionalSizeParam = NEO::additionalKernelLaunchSizeParamNotSet;

View File

@@ -1483,5 +1483,30 @@ HWTEST2_F(CommandListAppendLaunchKernelMockModule,
EXPECT_NE(kernelAllocationIt, cmdlistResidency.end());
}
HWTEST2_F(CommandListAppendLaunchKernelMockModule,
givenOutWalkerPtrDispatchParamWhenAppendingKernelThenSetPtrToWalkerCmd,
IsAtLeastXeHpCore) {
using DefaultWalkerType = typename FamilyType::DefaultWalkerType;
ze_group_count_t groupCount{1, 1, 1};
ze_result_t returnValue;
CmdListKernelLaunchParams launchParams = {};
returnValue = commandList->appendLaunchKernel(kernel->toHandle(), groupCount, nullptr, 0, nullptr, launchParams, false);
ASSERT_EQ(ZE_RESULT_SUCCESS, returnValue);
auto usedSpaceAfter = commandList->getCmdContainer().getCommandStream()->getUsed();
ASSERT_NE(nullptr, launchParams.outWalker);
GenCmdList cmdList;
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
cmdList,
commandList->getCmdContainer().getCommandStream()->getCpuBase(),
usedSpaceAfter));
auto itorWalker = find<DefaultWalkerType *>(cmdList.begin(), cmdList.end());
ASSERT_NE(cmdList.end(), itorWalker);
EXPECT_EQ(*itorWalker, launchParams.outWalker);
}
} // namespace ult
} // namespace L0