mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
feature: add graph support for new append functions
Related-To: NEO-15606, NEO-15571 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3da7a3364c
commit
e88d1287c0
@@ -170,6 +170,11 @@ ze_result_t zeCommandListAppendLaunchKernelWithArguments(
|
||||
if (!hCommandList) {
|
||||
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
|
||||
}
|
||||
auto cmdList = L0::CommandList::fromHandle(hCommandList);
|
||||
auto ret = cmdList->capture<CaptureApi::zeCommandListAppendLaunchKernelWithArguments>(hCommandList, hKernel, groupCounts, groupSizes, pArguments, pNext, hSignalEvent, numWaitEvents, phWaitEvents);
|
||||
if (ret != ZE_RESULT_ERROR_NOT_AVAILABLE) {
|
||||
return ret;
|
||||
}
|
||||
return L0::CommandList::fromHandle(hCommandList)->appendLaunchKernelWithArguments(hKernel, groupCounts, groupSizes, pArguments, pNext, hSignalEvent, numWaitEvents, phWaitEvents);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,23 +23,27 @@ ze_result_t CommandList::validateLaunchParams(const Kernel &kernel, const CmdLis
|
||||
}
|
||||
|
||||
ze_result_t CommandList::cloneAppendKernelExtensions(const ze_base_desc_t *desc, void *&outPnext) {
|
||||
if (desc->stype == ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC) {
|
||||
auto cooperativeDesc = reinterpret_cast<const ze_command_list_append_launch_kernel_param_cooperative_desc_t *>(desc);
|
||||
auto cloneCooperativeDesc = new ze_command_list_append_launch_kernel_param_cooperative_desc_t;
|
||||
*cloneCooperativeDesc = *cooperativeDesc;
|
||||
cloneCooperativeDesc->pNext = nullptr;
|
||||
outPnext = cloneCooperativeDesc;
|
||||
} else {
|
||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||
if (desc) {
|
||||
if (desc->stype == ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC) {
|
||||
auto cooperativeDesc = reinterpret_cast<const ze_command_list_append_launch_kernel_param_cooperative_desc_t *>(desc);
|
||||
auto cloneCooperativeDesc = new ze_command_list_append_launch_kernel_param_cooperative_desc_t;
|
||||
*cloneCooperativeDesc = *cooperativeDesc;
|
||||
cloneCooperativeDesc->pNext = nullptr;
|
||||
outPnext = cloneCooperativeDesc;
|
||||
} else {
|
||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||
}
|
||||
}
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
void CommandList::freeClonedAppendKernelExtensions(void *pNext) {
|
||||
auto desc = reinterpret_cast<ze_base_desc_t *>(pNext);
|
||||
if (desc->stype == ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC) {
|
||||
auto cooperativeDesc = reinterpret_cast<ze_command_list_append_launch_kernel_param_cooperative_desc_t *>(desc);
|
||||
delete cooperativeDesc;
|
||||
if (desc) {
|
||||
if (desc->stype == ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC) {
|
||||
auto cooperativeDesc = reinterpret_cast<ze_command_list_append_launch_kernel_param_cooperative_desc_t *>(desc);
|
||||
delete cooperativeDesc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -423,6 +423,7 @@ TEST(GraphTestApiCapture, GivenCommandListInRecordStateThenCaptureCommandsInstea
|
||||
imgRegion.depth = 1;
|
||||
|
||||
ze_group_count_t groupCount = {1, 1, 1};
|
||||
ze_group_size_t groupSize = {1, 1, 1};
|
||||
|
||||
L0::Graph graph(&ctx, true);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, ::zeCommandListBeginCaptureIntoGraphExp(&cmdlist, &graph, nullptr));
|
||||
@@ -452,11 +453,13 @@ TEST(GraphTestApiCapture, GivenCommandListInRecordStateThenCaptureCommandsInstea
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, L0::zeCommandListAppendLaunchCooperativeKernel(&cmdlist, kernelHandle, &groupCount, nullptr, 0, nullptr));
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, L0::zeCommandListAppendLaunchKernelIndirect(&cmdlist, kernelHandle, &groupCount, nullptr, 0, nullptr));
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, L0::zeCommandListAppendLaunchMultipleKernelsIndirect(&cmdlist, numKernels, pKernelHandles, pCountBuffer, &groupCount, nullptr, 0, nullptr));
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, L0::zeCommandListAppendLaunchKernelWithParameters(&cmdlist, kernelHandle, &groupCount, nullptr, nullptr, 0, nullptr));
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, L0::zeCommandListAppendLaunchKernelWithArguments(&cmdlist, kernelHandle, groupCount, groupSize, nullptr, nullptr, nullptr, 0, nullptr));
|
||||
|
||||
ze_graph_handle_t hgraph = &graph;
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, ::zeCommandListEndGraphCaptureExp(&cmdlist, &hgraph, nullptr));
|
||||
|
||||
ASSERT_EQ(25U, graph.getCapturedCommands().size());
|
||||
ASSERT_EQ(27U, graph.getCapturedCommands().size());
|
||||
uint32_t i = 0;
|
||||
EXPECT_EQ(CaptureApi::zeCommandListAppendBarrier, static_cast<CaptureApi>(graph.getCapturedCommands()[i++].index()));
|
||||
EXPECT_EQ(CaptureApi::zeCommandListAppendMemoryCopy, static_cast<CaptureApi>(graph.getCapturedCommands()[i++].index()));
|
||||
@@ -483,6 +486,8 @@ TEST(GraphTestApiCapture, GivenCommandListInRecordStateThenCaptureCommandsInstea
|
||||
EXPECT_EQ(CaptureApi::zeCommandListAppendLaunchCooperativeKernel, static_cast<CaptureApi>(graph.getCapturedCommands()[i++].index()));
|
||||
EXPECT_EQ(CaptureApi::zeCommandListAppendLaunchKernelIndirect, static_cast<CaptureApi>(graph.getCapturedCommands()[i++].index()));
|
||||
EXPECT_EQ(CaptureApi::zeCommandListAppendLaunchMultipleKernelsIndirect, static_cast<CaptureApi>(graph.getCapturedCommands()[i++].index()));
|
||||
EXPECT_EQ(CaptureApi::zeCommandListAppendLaunchKernelWithParameters, static_cast<CaptureApi>(graph.getCapturedCommands()[i++].index()));
|
||||
EXPECT_EQ(CaptureApi::zeCommandListAppendLaunchKernelWithArguments, static_cast<CaptureApi>(graph.getCapturedCommands()[i++].index()));
|
||||
}
|
||||
|
||||
TEST(GraphForks, GivenUnknownChildCommandlistThenJoinDoesNothing) {
|
||||
@@ -753,6 +758,7 @@ TEST_F(GraphTestInstantiationTest, WhenInstantiatingGraphThenBakeCommandsIntoCom
|
||||
imgRegion.height = 1;
|
||||
imgRegion.depth = 1;
|
||||
ze_group_count_t groupCount = {1, 1, 1};
|
||||
ze_group_size_t groupSize = {1, 1, 1};
|
||||
|
||||
L0::Graph srcGraph(&ctx, true);
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, ::zeCommandListBeginCaptureIntoGraphExp(&cmdlist, &srcGraph, nullptr));
|
||||
@@ -782,6 +788,8 @@ TEST_F(GraphTestInstantiationTest, WhenInstantiatingGraphThenBakeCommandsIntoCom
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, L0::zeCommandListAppendLaunchCooperativeKernel(&cmdlist, kernelHandle, &groupCount, nullptr, 0, nullptr));
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, L0::zeCommandListAppendLaunchKernelIndirect(&cmdlist, kernelHandle, &groupCount, nullptr, 0, nullptr));
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, L0::zeCommandListAppendLaunchMultipleKernelsIndirect(&cmdlist, numKernels, pKernelHandles, pCountBuffer, &groupCount, nullptr, 0, nullptr));
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, L0::zeCommandListAppendLaunchKernelWithParameters(&cmdlist, kernelHandle, &groupCount, nullptr, nullptr, 0, nullptr));
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, L0::zeCommandListAppendLaunchKernelWithArguments(&cmdlist, kernelHandle, groupCount, groupSize, nullptr, nullptr, nullptr, 0, nullptr));
|
||||
|
||||
ze_graph_handle_t hgraph = &srcGraph;
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, ::zeCommandListEndGraphCaptureExp(&cmdlist, &hgraph, nullptr));
|
||||
@@ -814,6 +822,7 @@ TEST_F(GraphTestInstantiationTest, WhenInstantiatingGraphThenBakeCommandsIntoCom
|
||||
EXPECT_EQ(0U, graphHwCommands->appendLaunchKernelCalled);
|
||||
EXPECT_EQ(0U, graphHwCommands->appendLaunchKernelIndirectCalled);
|
||||
EXPECT_EQ(0U, graphHwCommands->appendLaunchMultipleKernelsIndirectCalled);
|
||||
EXPECT_EQ(0U, graphHwCommands->appendLaunchKernelWithParametersCalled);
|
||||
execGraph.instantiateFrom(srcGraph);
|
||||
EXPECT_EQ(1U, graphHwCommands->appendBarrierCalled);
|
||||
EXPECT_EQ(1U, graphHwCommands->appendMemoryCopyCalled);
|
||||
@@ -839,6 +848,7 @@ TEST_F(GraphTestInstantiationTest, WhenInstantiatingGraphThenBakeCommandsIntoCom
|
||||
EXPECT_EQ(2U, graphHwCommands->appendLaunchKernelCalled); // +1 for zeCommandListAppendLaunchCooperativeKernel
|
||||
EXPECT_EQ(1U, graphHwCommands->appendLaunchKernelIndirectCalled);
|
||||
EXPECT_EQ(1U, graphHwCommands->appendLaunchMultipleKernelsIndirectCalled);
|
||||
EXPECT_EQ(2U, graphHwCommands->appendLaunchKernelWithParametersCalled); // +1 for zeCommandListAppendLaunchKernelWithArguments
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE,
|
||||
|
||||
@@ -46,6 +46,8 @@ ze_result_t zeCommandListAppendSignalExternalSemaphoreExt(ze_command_list_handle
|
||||
ze_result_t zeCommandListAppendWaitExternalSemaphoreExt(ze_command_list_handle_t hCommandList, uint32_t numSemaphores, ze_external_semaphore_ext_handle_t *phSemaphores, ze_external_semaphore_wait_params_ext_t *waitParams, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents);
|
||||
ze_result_t zeCommandListAppendImageCopyToMemoryExt(ze_command_list_handle_t hCommandList, void *dstptr, ze_image_handle_t hSrcImage, const ze_image_region_t *pSrcRegion, uint32_t destRowPitch, uint32_t destSlicePitch, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents);
|
||||
ze_result_t zeCommandListAppendImageCopyFromMemoryExt(ze_command_list_handle_t hCommandList, ze_image_handle_t hDstImage, const void *srcptr, const ze_image_region_t *pDstRegion, uint32_t srcRowPitch, uint32_t srcSlicePitch, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents);
|
||||
ze_result_t zeCommandListAppendLaunchKernelWithParameters(ze_command_list_handle_t hCommandList, ze_kernel_handle_t hKernel, const ze_group_count_t *pGroupCounts, const void *pNext, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents);
|
||||
ze_result_t zeCommandListAppendLaunchKernelWithArguments(ze_command_list_handle_t hCommandList, ze_kernel_handle_t hKernel, const ze_group_count_t groupCounts, const ze_group_size_t groupSizes, void **pArguments, const void *pNext, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents);
|
||||
|
||||
namespace ult {
|
||||
|
||||
|
||||
@@ -570,7 +570,7 @@ DEFINE_APIARGS_FIELDS(zeCommandListAppendWaitExternalSemaphoreExt, "hCommandList
|
||||
DEFINE_APIARGS_FIELDS(zeCommandListAppendImageCopyToMemoryExt, "hCommandList", "dstptr", "hSrcImage", "pSrcRegion", "destRowPitch", "destSlicePitch", "hSignalEvent", "numWaitEvents", "phWaitEvents", "phWaitEvents[0]");
|
||||
DEFINE_APIARGS_FIELDS(zeCommandListAppendImageCopyFromMemoryExt, "hCommandList", "hDstImage", "srcptr", "pDstRegion", "srcRowPitch", "srcSlicePitch", "hSignalEvent", "numWaitEvents", "phWaitEvents", "phWaitEvents[0]");
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendWriteGlobalTimestamp) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendWriteGlobalTimestamp) {
|
||||
Closure<CaptureApi::zeCommandListAppendWriteGlobalTimestamp>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -578,7 +578,7 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendWriteGlobalTimestamp) {
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendWriteGlobalTimestamp>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendBarrier) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendBarrier) {
|
||||
Closure<CaptureApi::zeCommandListAppendBarrier>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -586,7 +586,7 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendBarrier) {
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendBarrier>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendMemoryRangesBarrier) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendMemoryRangesBarrier) {
|
||||
Closure<CaptureApi::zeCommandListAppendMemoryRangesBarrier>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -597,7 +597,7 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendMemoryRangesBarrier) {
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendMemoryRangesBarrier>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendMemoryCopy) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendMemoryCopy) {
|
||||
Closure<CaptureApi::zeCommandListAppendMemoryCopy>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -605,7 +605,7 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendMemoryCopy) {
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendMemoryCopy>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendMemoryFill) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendMemoryFill) {
|
||||
Closure<CaptureApi::zeCommandListAppendMemoryFill>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -613,7 +613,7 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendMemoryFill) {
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendMemoryFill>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendMemoryCopyRegion) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendMemoryCopyRegion) {
|
||||
Closure<CaptureApi::zeCommandListAppendMemoryCopyRegion>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -621,7 +621,7 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendMemoryCopyRegion) {
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendMemoryCopyRegion>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendMemoryCopyFromContext) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendMemoryCopyFromContext) {
|
||||
Closure<CaptureApi::zeCommandListAppendMemoryCopyFromContext>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -629,7 +629,7 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendMemoryCopyFromContext) {
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendMemoryCopyFromContext>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendImageCopy) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendImageCopy) {
|
||||
Closure<CaptureApi::zeCommandListAppendImageCopy>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -637,7 +637,7 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendImageCopy) {
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendImageCopy>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendImageCopyRegion) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendImageCopyRegion) {
|
||||
Closure<CaptureApi::zeCommandListAppendImageCopyRegion>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -649,7 +649,7 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendImageCopyRegion) {
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendImageCopyRegion>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendImageCopyToMemory) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendImageCopyToMemory) {
|
||||
Closure<CaptureApi::zeCommandListAppendImageCopyToMemory>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -658,7 +658,7 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendImageCopyToMemory) {
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendImageCopyToMemory>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendImageCopyFromMemory) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendImageCopyFromMemory) {
|
||||
Closure<CaptureApi::zeCommandListAppendImageCopyFromMemory>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -667,34 +667,34 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendImageCopyFromMemory) {
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendImageCopyFromMemory>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendMemoryPrefetch) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendMemoryPrefetch) {
|
||||
Closure<CaptureApi::zeCommandListAppendMemoryPrefetch>::ApiArgs args{};
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendMemoryPrefetch>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendMemAdvise) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendMemAdvise) {
|
||||
Closure<CaptureApi::zeCommandListAppendMemAdvise>::ApiArgs args{};
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendMemAdvise>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendSignalEvent) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendSignalEvent) {
|
||||
Closure<CaptureApi::zeCommandListAppendSignalEvent>::ApiArgs args{};
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendSignalEvent>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendWaitOnEvents) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendWaitOnEvents) {
|
||||
Closure<CaptureApi::zeCommandListAppendWaitOnEvents>::ApiArgs args{};
|
||||
args.numEvents = 1;
|
||||
args.phEvents = dummyEvents;
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendWaitOnEvents>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendEventReset) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendEventReset) {
|
||||
Closure<CaptureApi::zeCommandListAppendEventReset>::ApiArgs args{};
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendEventReset>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendQueryKernelTimestamps) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendQueryKernelTimestamps) {
|
||||
Closure<CaptureApi::zeCommandListAppendQueryKernelTimestamps>::ApiArgs args{};
|
||||
args.numEvents = 1;
|
||||
args.phEvents = dummyEvents;
|
||||
@@ -705,7 +705,7 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendQueryKernelTimestamps) {
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendQueryKernelTimestamps>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendLaunchKernel) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendLaunchKernel) {
|
||||
Closure<CaptureApi::zeCommandListAppendLaunchKernel>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -715,7 +715,7 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendLaunchKernel) {
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendLaunchKernel>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendLaunchCooperativeKernel) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendLaunchCooperativeKernel) {
|
||||
Closure<CaptureApi::zeCommandListAppendLaunchCooperativeKernel>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -725,7 +725,7 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendLaunchCooperativeKernel)
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendLaunchCooperativeKernel>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendLaunchKernelIndirect) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendLaunchKernelIndirect) {
|
||||
Closure<CaptureApi::zeCommandListAppendLaunchKernelIndirect>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -735,16 +735,30 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendLaunchKernelIndirect) {
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendLaunchKernelIndirect>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendLaunchKernelWithParameters) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendLaunchKernelWithParameters) {
|
||||
// currently skipped as zeCommandListAppendLaunchKernelWithParameters is not supported yet
|
||||
GTEST_SKIP();
|
||||
Closure<CaptureApi::zeCommandListAppendLaunchKernelWithParameters>::ApiArgs args{nullptr};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
args.hSignalEvent = dummyEvents[0];
|
||||
args.kernelHandle = &kernel;
|
||||
args.pGroupCounts = &dummyLaunchArgs;
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendLaunchKernelWithParameters>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendLaunchMultipleKernelsIndirect) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendLaunchKernelWithArguments) {
|
||||
// currently skipped as zeCommandListAppendLaunchKernelWithArguments is not supported yet
|
||||
GTEST_SKIP();
|
||||
Closure<CaptureApi::zeCommandListAppendLaunchKernelWithArguments>::ApiArgs args{nullptr};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
args.hSignalEvent = dummyEvents[0];
|
||||
args.kernelHandle = &kernel;
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendLaunchKernelWithArguments>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendLaunchMultipleKernelsIndirect) {
|
||||
Closure<CaptureApi::zeCommandListAppendLaunchMultipleKernelsIndirect>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -756,7 +770,7 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendLaunchMultipleKernelsInd
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendLaunchMultipleKernelsIndirect>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendSignalExternalSemaphoreExt) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendSignalExternalSemaphoreExt) {
|
||||
Closure<CaptureApi::zeCommandListAppendSignalExternalSemaphoreExt>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -767,7 +781,7 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendSignalExternalSemaphoreE
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendSignalExternalSemaphoreExt>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendWaitExternalSemaphoreExt) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendWaitExternalSemaphoreExt) {
|
||||
Closure<CaptureApi::zeCommandListAppendWaitExternalSemaphoreExt>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -778,7 +792,7 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendWaitExternalSemaphoreExt
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendWaitExternalSemaphoreExt>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendImageCopyToMemoryExt) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendImageCopyToMemoryExt) {
|
||||
Closure<CaptureApi::zeCommandListAppendImageCopyToMemoryExt>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -787,7 +801,7 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendImageCopyToMemoryExt) {
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendImageCopyToMemoryExt>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, zeCommandListAppendImageCopyFromMemoryExt) {
|
||||
TEST_F(ExtractParametersTest, zeCommandListAppendImageCopyFromMemoryExt) {
|
||||
Closure<CaptureApi::zeCommandListAppendImageCopyFromMemoryExt>::ApiArgs args{};
|
||||
args.numWaitEvents = 1;
|
||||
args.phWaitEvents = dummyEvents;
|
||||
@@ -796,7 +810,7 @@ TEST_F(ExtractParametersTestFixture, zeCommandListAppendImageCopyFromMemoryExt)
|
||||
expectAllApiArgsPresent<CaptureApi::zeCommandListAppendImageCopyFromMemoryExt>(args);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, GivenMultipleWaitEventsWhenExtractParametersIsCalledThenParametersAreExtractedCorrectly) {
|
||||
TEST_F(ExtractParametersTest, GivenMultipleWaitEventsWhenExtractParametersIsCalledThenParametersAreExtractedCorrectly) {
|
||||
ze_event_handle_t multipleWaitEvents[2] = {
|
||||
reinterpret_cast<ze_event_handle_t>(0x100),
|
||||
reinterpret_cast<ze_event_handle_t>(0x200)};
|
||||
@@ -818,7 +832,7 @@ TEST_F(ExtractParametersTestFixture, GivenMultipleWaitEventsWhenExtractParameter
|
||||
EXPECT_EQ(getParamValue(params, "phWaitEvents[1]"), waitEventStr2);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, GivenMultipleEventsWhenExtractParametersIsCalledThenParametersAreExtractedCorrectly) {
|
||||
TEST_F(ExtractParametersTest, GivenMultipleEventsWhenExtractParametersIsCalledThenParametersAreExtractedCorrectly) {
|
||||
constexpr uintptr_t firstEventAddress = 0x400;
|
||||
constexpr uintptr_t secondEventAddress = 0x500;
|
||||
ze_event_handle_t multipleEvents[2] = {
|
||||
@@ -842,7 +856,7 @@ TEST_F(ExtractParametersTestFixture, GivenMultipleEventsWhenExtractParametersIsC
|
||||
EXPECT_EQ(getParamValue(params, "phEvents[1]"), eventStr2);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, GivenMultipleSemaphoresWhenExtractParametersIsCalledThenParametersAreExtractedCorrectly) {
|
||||
TEST_F(ExtractParametersTest, GivenMultipleSemaphoresWhenExtractParametersIsCalledThenParametersAreExtractedCorrectly) {
|
||||
constexpr uintptr_t firstSemaphoreAddress = 0x600;
|
||||
constexpr uintptr_t secondSemaphoreAddress = 0x700;
|
||||
ze_external_semaphore_ext_handle_t multipleSemaphores[2] = {
|
||||
@@ -867,7 +881,7 @@ TEST_F(ExtractParametersTestFixture, GivenMultipleSemaphoresWhenExtractParameter
|
||||
EXPECT_EQ(getParamValue(params, "phSemaphores[1]"), semaphoreStr2);
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, GivenZeroEventsWhenExtractParametersIsCalledThenNoIndividualEntriesArePresent) {
|
||||
TEST_F(ExtractParametersTest, GivenZeroEventsWhenExtractParametersIsCalledThenNoIndividualEntriesArePresent) {
|
||||
Closure<CaptureApi::zeCommandListAppendWaitOnEvents>::ApiArgs args{};
|
||||
args.numEvents = 0;
|
||||
args.phEvents = nullptr;
|
||||
@@ -881,7 +895,7 @@ TEST_F(ExtractParametersTestFixture, GivenZeroEventsWhenExtractParametersIsCalle
|
||||
EXPECT_FALSE(hasParam(params, "phEvents[0]"));
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, GivenNoOptionalRegionParametersWhenExtractParametersIsCalledThenNoRegionEntriesArePresent) {
|
||||
TEST_F(ExtractParametersTest, GivenNoOptionalRegionParametersWhenExtractParametersIsCalledThenNoRegionEntriesArePresent) {
|
||||
Closure<CaptureApi::zeCommandListAppendImageCopyRegion>::ApiArgs args{};
|
||||
Closure<CaptureApi::zeCommandListAppendImageCopyRegion> closure(args, storage);
|
||||
auto params = GraphDumpHelper::extractParameters<CaptureApi::zeCommandListAppendImageCopyRegion>(closure, storage);
|
||||
@@ -891,7 +905,7 @@ TEST_F(ExtractParametersTestFixture, GivenNoOptionalRegionParametersWhenExtractP
|
||||
EXPECT_FALSE(hasParam(params, "pDstRegion"));
|
||||
}
|
||||
|
||||
TEST_F(ExtractParametersTestFixture, GivenNoOptionalOffsetsParameterWhenExtractParametersIsCalledThenNoOffsetsEntryIsPresent) {
|
||||
TEST_F(ExtractParametersTest, GivenNoOptionalOffsetsParameterWhenExtractParametersIsCalledThenNoOffsetsEntryIsPresent) {
|
||||
Closure<CaptureApi::zeCommandListAppendQueryKernelTimestamps>::ApiArgs args{};
|
||||
Closure<CaptureApi::zeCommandListAppendQueryKernelTimestamps> closure(args, storage);
|
||||
auto params = GraphDumpHelper::extractParameters<CaptureApi::zeCommandListAppendQueryKernelTimestamps>(closure, storage);
|
||||
|
||||
@@ -105,7 +105,7 @@ class GraphDotExporterFileTest : public GraphDotExporterTest {
|
||||
return {__VA_ARGS__}; \
|
||||
}
|
||||
|
||||
class ExtractParametersTestFixture : public ::testing::Test {
|
||||
class ExtractParametersTestFixture {
|
||||
protected:
|
||||
ClosureExternalStorage storage;
|
||||
|
||||
@@ -122,10 +122,12 @@ class ExtractParametersTestFixture : public ::testing::Test {
|
||||
Mock<KernelImp> kernel;
|
||||
ze_kernel_handle_t dummyKernels[1];
|
||||
|
||||
void SetUp() override {
|
||||
void setUp() {
|
||||
dummyKernels[0] = &kernel;
|
||||
}
|
||||
|
||||
void tearDown() {}
|
||||
|
||||
template <CaptureApi api, typename ApiArgsT>
|
||||
void expectAllApiArgsPresent(const ApiArgsT &args) {
|
||||
Closure<api> closure(args, storage);
|
||||
@@ -157,5 +159,7 @@ class ExtractParametersTestFixture : public ::testing::Test {
|
||||
}
|
||||
};
|
||||
|
||||
using ExtractParametersTest = Test<ExtractParametersTestFixture>;
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
|
||||
@@ -11,6 +11,7 @@ target_sources(${L0_STATIC_LIB_NAME}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/graph.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/graph_export.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/graph_export.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/captured_apis${BRANCH_DIR_SUFFIX}graph_captured_apis.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}graph_export.inl
|
||||
)
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "level_zero/core/source/kernel/kernel_mutable_state.h"
|
||||
#include "level_zero/ze_api.h"
|
||||
#include "level_zero/ze_intel_gpu.h"
|
||||
|
||||
#include <span>
|
||||
#include <string>
|
||||
@@ -49,6 +50,7 @@ struct Event;
|
||||
RR_CAPTURED_API(zeCommandListAppendLaunchCooperativeKernel) \
|
||||
RR_CAPTURED_API(zeCommandListAppendLaunchKernelIndirect) \
|
||||
RR_CAPTURED_API(zeCommandListAppendLaunchKernelWithParameters) \
|
||||
RR_CAPTURED_API(zeCommandListAppendLaunchKernelWithArguments) \
|
||||
RR_CAPTURED_API(zeCommandListAppendLaunchMultipleKernelsIndirect) \
|
||||
RR_CAPTURED_API(zeCommandListAppendSignalExternalSemaphoreExt) \
|
||||
RR_CAPTURED_API(zeCommandListAppendWaitExternalSemaphoreExt) \
|
||||
@@ -859,6 +861,61 @@ struct Closure<CaptureApi::zeCommandListAppendLaunchMultipleKernelsIndirect> {
|
||||
ze_result_t instantiateTo(CommandList &executionTarget, ClosureExternalStorage &externalStorage) const;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Closure<CaptureApi::zeCommandListAppendLaunchKernelWithParameters> {
|
||||
inline static constexpr bool isSupported = true;
|
||||
|
||||
struct ApiArgs {
|
||||
ze_command_list_handle_t hCommandList;
|
||||
ze_kernel_handle_t kernelHandle;
|
||||
const ze_group_count_t *pGroupCounts;
|
||||
const void *pNext;
|
||||
ze_event_handle_t hSignalEvent;
|
||||
uint32_t numWaitEvents;
|
||||
ze_event_handle_t *phWaitEvents;
|
||||
} apiArgs;
|
||||
|
||||
struct IndirectArgs : IndirectArgsWithWaitEvents {
|
||||
IndirectArgs(const Closure::ApiArgs &apiArgs, ClosureExternalStorage &externalStorage);
|
||||
~IndirectArgs();
|
||||
ze_group_count_t groupCounts;
|
||||
void *pNext;
|
||||
ClosureExternalStorage::KernelStateId kernelStateId = ClosureExternalStorage::invalidKernelStateId;
|
||||
} indirectArgs;
|
||||
|
||||
Closure(const ApiArgs &apiArgs, ClosureExternalStorage &externalStorage) : apiArgs(apiArgs), indirectArgs(apiArgs, externalStorage) {}
|
||||
|
||||
ze_result_t instantiateTo(CommandList &executionTarget, ClosureExternalStorage &externalStorage) const;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Closure<CaptureApi::zeCommandListAppendLaunchKernelWithArguments> {
|
||||
inline static constexpr bool isSupported = true;
|
||||
|
||||
struct ApiArgs {
|
||||
ze_command_list_handle_t hCommandList;
|
||||
ze_kernel_handle_t kernelHandle;
|
||||
const ze_group_count_t groupCounts = {0, 0, 0};
|
||||
const ze_group_size_t groupSizes = {0, 0, 0};
|
||||
void **pArguments;
|
||||
const void *pNext;
|
||||
ze_event_handle_t hSignalEvent;
|
||||
uint32_t numWaitEvents;
|
||||
ze_event_handle_t *phWaitEvents;
|
||||
} apiArgs;
|
||||
|
||||
struct IndirectArgs : IndirectArgsWithWaitEvents {
|
||||
IndirectArgs(const Closure::ApiArgs &apiArgs, ClosureExternalStorage &externalStorage);
|
||||
~IndirectArgs();
|
||||
void *pNext;
|
||||
ClosureExternalStorage::KernelStateId kernelStateId = ClosureExternalStorage::invalidKernelStateId;
|
||||
} indirectArgs;
|
||||
|
||||
Closure(const ApiArgs &apiArgs, ClosureExternalStorage &externalStorage) : apiArgs(apiArgs), indirectArgs(apiArgs, externalStorage) {}
|
||||
|
||||
ze_result_t instantiateTo(CommandList &executionTarget, ClosureExternalStorage &externalStorage) const;
|
||||
};
|
||||
|
||||
namespace GraphDumpHelper {
|
||||
|
||||
template <CaptureApi api>
|
||||
|
||||
@@ -298,6 +298,58 @@ ze_result_t Closure<CaptureApi::zeCommandListAppendLaunchMultipleKernelsIndirect
|
||||
return zeCommandListAppendLaunchMultipleKernelsIndirect(&executionTarget, apiArgs.numKernels, phKernelClones.data(), apiArgs.pCountBuffer, apiArgs.launchArgsBuffer, apiArgs.hSignalEvent, apiArgs.numWaitEvents, externalStorage.getEventsList(indirectArgs.waitEvents));
|
||||
}
|
||||
|
||||
Closure<CaptureApi::zeCommandListAppendLaunchKernelWithParameters>::IndirectArgs::IndirectArgs(const ApiArgs &apiArgs, ClosureExternalStorage &externalStorage) : IndirectArgsWithWaitEvents(apiArgs, externalStorage) {
|
||||
this->groupCounts = *apiArgs.pGroupCounts;
|
||||
this->pNext = nullptr;
|
||||
|
||||
auto result = CommandList::cloneAppendKernelExtensions(reinterpret_cast<const ze_base_desc_t *>(apiArgs.pNext), this->pNext);
|
||||
UNRECOVERABLE_IF(result != ZE_RESULT_SUCCESS);
|
||||
|
||||
auto kernel = static_cast<KernelImp *>(Kernel::fromHandle(apiArgs.kernelHandle));
|
||||
L0::KernelMutableState stateSnapshot = kernel->getPrivateState();
|
||||
this->kernelStateId = externalStorage.registerKernelState(std::move(stateSnapshot));
|
||||
}
|
||||
|
||||
Closure<CaptureApi::zeCommandListAppendLaunchKernelWithParameters>::IndirectArgs::~IndirectArgs() {
|
||||
CommandList::freeClonedAppendKernelExtensions(this->pNext);
|
||||
}
|
||||
|
||||
ze_result_t Closure<CaptureApi::zeCommandListAppendLaunchKernelWithParameters>::instantiateTo(L0::CommandList &executionTarget, ClosureExternalStorage &externalStorage) const {
|
||||
auto *kernelOrig = static_cast<KernelImp *>(Kernel::fromHandle(apiArgs.kernelHandle));
|
||||
DEBUG_BREAK_IF(nullptr == kernelOrig);
|
||||
|
||||
auto kernelClone = kernelOrig->cloneWithStateOverride(externalStorage.getKernelMutableState(this->indirectArgs.kernelStateId));
|
||||
|
||||
return zeCommandListAppendLaunchKernelWithParameters(&executionTarget, kernelClone.get(), &indirectArgs.groupCounts, indirectArgs.pNext, apiArgs.hSignalEvent, apiArgs.numWaitEvents, externalStorage.getEventsList(indirectArgs.waitEvents));
|
||||
}
|
||||
|
||||
Closure<CaptureApi::zeCommandListAppendLaunchKernelWithArguments>::IndirectArgs::IndirectArgs(const ApiArgs &apiArgs, ClosureExternalStorage &externalStorage) : IndirectArgsWithWaitEvents(apiArgs, externalStorage) {
|
||||
this->pNext = nullptr;
|
||||
|
||||
auto result = CommandList::cloneAppendKernelExtensions(reinterpret_cast<const ze_base_desc_t *>(apiArgs.pNext), this->pNext);
|
||||
UNRECOVERABLE_IF(result != ZE_RESULT_SUCCESS);
|
||||
|
||||
auto kernel = static_cast<KernelImp *>(Kernel::fromHandle(apiArgs.kernelHandle));
|
||||
result = CommandList::setKernelState(kernel, apiArgs.groupSizes, apiArgs.pArguments);
|
||||
UNRECOVERABLE_IF(result != ZE_RESULT_SUCCESS);
|
||||
|
||||
L0::KernelMutableState stateSnapshot = kernel->getPrivateState();
|
||||
this->kernelStateId = externalStorage.registerKernelState(std::move(stateSnapshot));
|
||||
}
|
||||
|
||||
Closure<CaptureApi::zeCommandListAppendLaunchKernelWithArguments>::IndirectArgs::~IndirectArgs() {
|
||||
CommandList::freeClonedAppendKernelExtensions(this->pNext);
|
||||
}
|
||||
|
||||
ze_result_t Closure<CaptureApi::zeCommandListAppendLaunchKernelWithArguments>::instantiateTo(L0::CommandList &executionTarget, ClosureExternalStorage &externalStorage) const {
|
||||
auto *kernelOrig = static_cast<KernelImp *>(Kernel::fromHandle(apiArgs.kernelHandle));
|
||||
DEBUG_BREAK_IF(nullptr == kernelOrig);
|
||||
|
||||
auto kernelClone = kernelOrig->cloneWithStateOverride(externalStorage.getKernelMutableState(this->indirectArgs.kernelStateId));
|
||||
|
||||
return zeCommandListAppendLaunchKernelWithParameters(&executionTarget, kernelClone.get(), &apiArgs.groupCounts, this->indirectArgs.pNext, apiArgs.hSignalEvent, apiArgs.numWaitEvents, externalStorage.getEventsList(indirectArgs.waitEvents));
|
||||
}
|
||||
|
||||
ExecutableGraph::~ExecutableGraph() = default;
|
||||
|
||||
L0::CommandList *ExecutableGraph::allocateAndAddCommandListSubmissionNode() {
|
||||
|
||||
@@ -631,6 +631,13 @@ std::vector<std::pair<std::string, std::string>> extractParameters<CaptureApi::z
|
||||
return {};
|
||||
}
|
||||
|
||||
template <>
|
||||
std::vector<std::pair<std::string, std::string>> extractParameters<CaptureApi::zeCommandListAppendLaunchKernelWithArguments>(
|
||||
const Closure<CaptureApi::zeCommandListAppendLaunchKernelWithArguments> &closure, const ClosureExternalStorage &storage) {
|
||||
// does not have closure specialization yet
|
||||
return {};
|
||||
}
|
||||
|
||||
template <>
|
||||
std::vector<std::pair<std::string, std::string>> extractParameters<CaptureApi::zeCommandListAppendLaunchMultipleKernelsIndirect>(
|
||||
const Closure<CaptureApi::zeCommandListAppendLaunchMultipleKernelsIndirect> &closure, const ClosureExternalStorage &storage) {
|
||||
|
||||
Reference in New Issue
Block a user