performance: R&R - return early from captureCommand if regular cmdlist

Skip looping over wait-events when it is known that none of them can be
a potential fork point. E.g. at instantiation stage capturing has
already been disabled but the `captureCommand()` is entered anyway for
any zeAPI call supporting R&R.

Related-To: NEO-16017
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
This commit is contained in:
Maciej Bielski
2025-10-03 18:04:52 +00:00
committed by Compute-Runtime-Automation
parent d4132cf8b0
commit 57add55b20
10 changed files with 100 additions and 4 deletions

View File

@@ -11,6 +11,8 @@
#include "level_zero/core/source/device/device.h"
#include <level_zero/ze_api.h>
#include "graph_captured_apis.h"
namespace L0 {
ze_result_t zeCommandListAppendBarrier(
ze_command_list_handle_t hCommandList,

View File

@@ -12,6 +12,8 @@
#include "level_zero/core/source/context/context.h"
#include <level_zero/ze_api.h>
#include "graph_captured_apis.h"
namespace L0 {
ze_result_t zeCommandListCreate(
ze_context_handle_t hContext,

View File

@@ -13,6 +13,8 @@
#include "level_zero/core/source/cmdlist/cmdlist_memory_copy_params.h"
#include <level_zero/ze_api.h>
#include "graph_captured_apis.h"
namespace L0 {
ze_result_t zeCommandListAppendMemoryCopy(
ze_command_list_handle_t hCommandList,

View File

@@ -10,6 +10,8 @@
#include "level_zero/core/source/event/event.h"
#include <level_zero/ze_api.h>
#include "graph_captured_apis.h"
namespace L0 {
ze_result_t zeEventPoolCreate(
ze_context_handle_t hContext,

View File

@@ -14,6 +14,8 @@
#include "level_zero/core/source/module/module_build_log.h"
#include <level_zero/ze_api.h>
#include "graph_captured_apis.h"
namespace L0 {
ze_result_t zeModuleCreate(
ze_context_handle_t hContext,

View File

@@ -493,7 +493,8 @@ struct CommandList : _ze_command_list_handle_t {
template <CaptureApi api, typename... TArgs>
ze_result_t capture(TArgs... apiArgs) {
return L0::captureCommand<api>(*this, this->captureTarget, apiArgs...);
return this->isImmediateType() ? L0::captureCommand<api>(*this, this->captureTarget, apiArgs...)
: ZE_RESULT_ERROR_NOT_AVAILABLE;
}
inline bool getIsWalkerWithProfilingEnqueued() {

View File

@@ -353,7 +353,7 @@ struct Event : _ze_event_handle_t {
static bool isAggregatedEvent(const Event *event) { return (event && event->getInOrderIncrementValue(1) > 0); }
CommandList *getRecordedSignalFrom() const {
MOCKABLE_VIRTUAL CommandList *getRecordedSignalFrom() const {
return this->recordedSignalFrom;
}

View File

@@ -90,10 +90,42 @@ TEST(GraphTestApiCreate, GivenInvalidGraphThenGraphDestroyReturnsError) {
EXPECT_NE(ZE_RESULT_SUCCESS, err);
}
TEST(GraphTestApiCaptureBeginEnd, GivenGraphsEnabledWhenCapturingCmdlistThenItWorksForImmediateAndReturnsEarlyForRegular) {
GraphsCleanupGuard graphCleanup;
struct MyMockEvent : public Mock<Event> {
CommandList *getRecordedSignalFrom() const override {
getRecordedSignalFromCalled = true;
return nullptr;
}
mutable bool getRecordedSignalFromCalled = false;
} event;
auto hEvent = event.toHandle();
L0::Graph *pGraph = nullptr;
Mock<CommandList> mockCmdList;
mockCmdList.setCaptureTarget(pGraph);
auto hCmdList = mockCmdList.toHandle();
auto &cmdList = static_cast<Mock<CommandList>::BaseClass &>(mockCmdList);
processUsesGraphs.store(true);
EXPECT_TRUE(areGraphsEnabled());
EXPECT_FALSE(cmdList.isImmediateType());
auto ret1 = cmdList.capture<CaptureApi::zeCommandListAppendBarrier>(hCmdList, nullptr, 1U, &hEvent);
EXPECT_EQ(ret1, ZE_RESULT_ERROR_NOT_AVAILABLE);
EXPECT_FALSE(event.getRecordedSignalFromCalled);
mockCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
auto ret2 = cmdList.capture<CaptureApi::zeCommandListAppendBarrier>(hCmdList, nullptr, 1U, &hEvent);
EXPECT_EQ(ret2, ZE_RESULT_ERROR_NOT_AVAILABLE);
EXPECT_TRUE(event.getRecordedSignalFromCalled);
}
TEST(GraphTestApiCaptureBeginEnd, GivenNonNullPNextThenGraphBeginCaptureReturnsError) {
GraphsCleanupGuard graphCleanup;
Mock<Context> ctx;
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
auto cmdListHandle = cmdlist.toHandle();
ze_base_desc_t ext = {};
ext.stype = ZE_STRUCTURE_TYPE_MUTABLE_GRAPH_ARGUMENT_EXP_DESC;
@@ -471,6 +503,7 @@ TEST_F(GraphTestApiSubmit, GivenInvalidCmdListThenGraphAppendReturnsError) {
TEST_F(GraphTestApiSubmit, GivenInvalidGraphThenGraphAppendReturnsError) {
GraphsCleanupGuard graphCleanup;
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
auto cmdListHandle = cmdlist.toHandle();
auto err = zeCommandListAppendGraphExp(cmdListHandle, nullptr, nullptr, nullptr, 0, nullptr);
@@ -615,6 +648,7 @@ TEST(GraphForks, GivenNullEventThenRecordHandleSignaleEventDoesNothing) {
};
Mock<Context> ctx;
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
MockGraph graph{&ctx, true};
recordHandleSignalEventFromPreviousCommand(cmdlist, graph, nullptr);
EXPECT_TRUE(graph.recordedSignals.empty());
@@ -628,6 +662,7 @@ TEST(GraphForks, GivenRegularEventDependencyThenCommandlistDoesNotStartRecording
Mock<Event> regularEvent;
ze_event_handle_t regularEventHandle = regularEvent.toHandle();
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
auto cmdListHandle = cmdlist.toHandle();
auto err = zeCommandListAppendWaitOnEvents(cmdListHandle, 1, &regularEventHandle);
EXPECT_EQ(ZE_RESULT_SUCCESS, err);
@@ -639,8 +674,10 @@ TEST_F(GraphInstantiation, GivenSourceGraphThenExecutableIsInstantiatedProperly)
MockGraphContextReturningSpecificCmdList ctx;
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
auto cmdListHandle = cmdlist.toHandle();
Mock<CommandList> subCmdlist;
subCmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Mock<Event> signalEvents[3];
Mock<Event> waitEvents[3];
ze_event_handle_t waitEventsList[3] = {waitEvents[0].toHandle(), waitEvents[1].toHandle(), waitEvents[2].toHandle()};
@@ -709,8 +746,12 @@ TEST_F(GraphInstantiation, GivenSourceGraphThenExecutableIsInstantiatedWithPrese
};
struct MockCmdListCheckSequence : Mock<CommandList> {
using WhiteBox<::L0::CommandListImp>::cmdListType;
std::vector<CmdInfo> &sequenceContainer;
MockCmdListCheckSequence(std::vector<CmdInfo> &sequenceContainer) : sequenceContainer(sequenceContainer) {}
MockCmdListCheckSequence(std::vector<CmdInfo> &sequenceContainer) : sequenceContainer(sequenceContainer) {
cmdListType = ::L0::CommandList::CommandListType::typeImmediate;
}
ze_result_t appendBarrier(ze_event_handle_t hSignalEvent,
uint32_t numWaitEvents,
@@ -722,8 +763,10 @@ TEST_F(GraphInstantiation, GivenSourceGraphThenExecutableIsInstantiatedWithPrese
MockGraphContextReturningSpecificCmdList ctx;
MockGraphCmdListWithContext cmdlist{&ctx};
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
auto cmdListHandle = cmdlist.toHandle();
MockGraphCmdListWithContext subCmdlist{&ctx};
subCmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
auto subCmdListHandle = subCmdlist.toHandle();
Mock<Event> forkEvent;
Mock<Event> joinEvent;
@@ -1357,6 +1400,7 @@ TEST_F(GraphExecution, GivenExecutableGraphWhenSubmittingItToCommandListThenAppe
MockGraphContextReturningSpecificCmdList ctx;
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
auto cmdListHandle = cmdlist.toHandle();
ctx.cmdListsToReturn.push_back(new Mock<CommandList>());

View File

@@ -30,7 +30,11 @@ struct GraphsCleanupGuard {
};
struct MockGraphCmdListWithContext : Mock<CommandList> {
MockGraphCmdListWithContext(L0::Context *ctx) : ctx(ctx) {}
using WhiteBox<::L0::CommandListImp>::cmdListType;
MockGraphCmdListWithContext(L0::Context *ctx) : ctx(ctx) {
cmdListType = ::L0::CommandList::CommandListType::typeImmediate;
}
ze_result_t getContextHandle(ze_context_handle_t *phContext) override {
*phContext = ctx;
return ZE_RESULT_SUCCESS;

View File

@@ -46,6 +46,7 @@ TEST_F(GraphDotExporterTest, GivenGraphWithSingleCommandWhenExportToStringThenCo
Graph testGraph{&ctx, true};
Mock<Event> event;
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
testGraph.capture<CaptureApi::zeCommandListAppendBarrier>(&cmdlist, &event, 0U, nullptr);
testGraph.stopCapturing();
@@ -59,6 +60,7 @@ TEST_F(GraphDotExporterTest, GivenGraphWithMultipleCommandsWhenExportToStringThe
Graph testGraph{&ctx, true};
Mock<Event> event;
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
testGraph.capture<CaptureApi::zeCommandListAppendBarrier>(&cmdlist, &event, 0U, nullptr);
testGraph.capture<CaptureApi::zeCommandListAppendMemoryCopy>(&cmdlist, nullptr, nullptr, 0U, nullptr, 0U, nullptr);
@@ -87,6 +89,7 @@ TEST_F(GraphDotExporterTest, GivenGraphWithCommandWhenWriteNodesThenGeneratesNod
Graph testGraph{&ctx, true};
Mock<Event> event;
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
testGraph.capture<CaptureApi::zeCommandListAppendBarrier>(&cmdlist, &event, 0U, nullptr);
testGraph.stopCapturing();
@@ -103,6 +106,7 @@ TEST_F(GraphDotExporterTest, GivenGraphWithMultipleCommandsWhenWriteEdgesThenGen
Graph testGraph{&ctx, true};
Mock<Event> event;
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
testGraph.capture<CaptureApi::zeCommandListAppendBarrier>(&cmdlist, &event, 0U, nullptr);
testGraph.capture<CaptureApi::zeCommandListAppendMemoryCopy>(&cmdlist, nullptr, nullptr, 0U, nullptr, 0U, nullptr);
@@ -119,6 +123,7 @@ TEST_F(GraphDotExporterTest, GivenGraphWithCommandWhenGetCommandNodeLabelThenRet
Graph testGraph{&ctx, true};
Mock<Event> event;
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
testGraph.capture<CaptureApi::zeCommandListAppendBarrier>(&cmdlist, &event, 0U, nullptr);
testGraph.stopCapturing();
@@ -131,6 +136,7 @@ TEST_F(GraphDotExporterTest, GivenDifferentCommandTypesWhenGetCommandNodeAttribu
Graph testGraph{&ctx, true};
Mock<Event> event;
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
testGraph.capture<CaptureApi::zeCommandListAppendBarrier>(&cmdlist, &event, 0U, nullptr);
testGraph.capture<CaptureApi::zeCommandListAppendMemoryCopy>(&cmdlist, nullptr, nullptr, 0U, nullptr, 0U, nullptr);
@@ -187,7 +193,9 @@ TEST_F(GraphDotExporterTest, GivenGraphWithSubgraphsWhenWriteSubgraphsThenGenera
Mock<Event> forkEvent;
Mock<Event> joinEvent;
Mock<CommandList> mainCmdList;
mainCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Mock<CommandList> subCmdList;
subCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Graph *testGraphPtr = &testGraph;
captureCommand<CaptureApi::zeCommandListAppendBarrier>(mainCmdList, testGraphPtr, &mainCmdList, &forkEvent, 0U, nullptr);
@@ -221,8 +229,11 @@ TEST_F(GraphDotExporterTest, GivenGraphWithNestedSubgraphsWhenWriteSubgraphsThen
Mock<Event> joinEvent1;
Mock<Event> joinEvent2;
Mock<CommandList> mainCmdList;
mainCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Mock<CommandList> subCmdList1;
subCmdList1.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Mock<CommandList> subCmdList2;
subCmdList2.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Graph *testGraphPtr = &testGraph;
captureCommand<CaptureApi::zeCommandListAppendBarrier>(mainCmdList, testGraphPtr, &mainCmdList, &forkEvent1, 0U, nullptr);
@@ -263,8 +274,11 @@ TEST_F(GraphDotExporterTest, GivenGraphWithAdjacentSubgraphsWhenWriteSubgraphsTh
Mock<Event> joinEvent1;
Mock<Event> joinEvent2;
Mock<CommandList> mainCmdList;
mainCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Mock<CommandList> subCmdList1;
subCmdList1.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Mock<CommandList> subCmdList2;
subCmdList2.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Graph *testGraphPtr = &testGraph;
captureCommand<CaptureApi::zeCommandListAppendBarrier>(mainCmdList, testGraphPtr, &mainCmdList, &forkEvent1, 0U, nullptr);
@@ -314,7 +328,9 @@ TEST_F(GraphDotExporterTest, WhenFindSubgraphIndexWithInvalidSubgraphThenReturns
Mock<Event> forkEvent;
Mock<Event> joinEvent;
Mock<CommandList> mainCmdList;
mainCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Mock<CommandList> subCmdList;
subCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Graph *testGraphPtr = &testGraph;
captureCommand<CaptureApi::zeCommandListAppendBarrier>(mainCmdList, testGraphPtr, &mainCmdList, &forkEvent, 0U, nullptr);
@@ -339,7 +355,9 @@ TEST_F(GraphDotExporterTest, WhenFindSubgraphIndexWithValidGraphThenReturnsCorre
Mock<Event> forkEvent;
Mock<Event> joinEvent;
Mock<CommandList> mainCmdList;
mainCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Mock<CommandList> subCmdList;
subCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Graph *testGraphPtr = &testGraph;
captureCommand<CaptureApi::zeCommandListAppendBarrier>(mainCmdList, testGraphPtr, &mainCmdList, &forkEvent, 0U, nullptr);
@@ -372,7 +390,9 @@ TEST_F(GraphDotExporterTest, WhenFindSubgraphIndexByCommandListWithInvalidComman
Mock<Event> forkEvent;
Mock<Event> joinEvent;
Mock<CommandList> mainCmdList;
mainCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Mock<CommandList> subCmdList;
subCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Graph *testGraphPtr = &testGraph;
captureCommand<CaptureApi::zeCommandListAppendBarrier>(mainCmdList, testGraphPtr, &mainCmdList, &forkEvent, 0U, nullptr);
@@ -397,7 +417,9 @@ TEST_F(GraphDotExporterTest, WhenFindSubgraphIndexByCommandListWithValidCommandL
Mock<Event> forkEvent;
Mock<Event> joinEvent;
Mock<CommandList> mainCmdList;
mainCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Mock<CommandList> subCmdList;
subCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Graph *testGraphPtr = &testGraph;
captureCommand<CaptureApi::zeCommandListAppendBarrier>(mainCmdList, testGraphPtr, &mainCmdList, &forkEvent, 0U, nullptr);
@@ -422,7 +444,9 @@ TEST_F(GraphDotExporterTest, GivenGraphWithEmptySubgraphWhenWriteForkJoinEdgesTh
Mock<Event> forkEvent;
Mock<Event> joinEvent;
Mock<CommandList> mainCmdList;
mainCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Mock<CommandList> subCmdList;
subCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Graph *testGraphPtr = &testGraph;
captureCommand<CaptureApi::zeCommandListAppendBarrier>(mainCmdList, testGraphPtr, &mainCmdList, &forkEvent, 0U, nullptr);
@@ -446,7 +470,9 @@ TEST_F(GraphDotExporterTest, GivenGraphWithUnjoinedForksWhenWriteUnjoinedForkEdg
Graph testGraph{&ctx, true};
Mock<Event> forkEvent;
Mock<CommandList> mainCmdList;
mainCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Mock<CommandList> subCmdList;
subCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Graph *testGraphPtr = &testGraph;
captureCommand<CaptureApi::zeCommandListAppendBarrier>(mainCmdList, testGraphPtr, &mainCmdList, &forkEvent, 0U, nullptr);
@@ -475,7 +501,9 @@ TEST_F(GraphDotExporterTest, GivenGraphWithEmptyUnjoinedSubgraphWhenWriteUnjoine
Graph testGraph{&ctx, true};
Mock<Event> forkEvent;
Mock<CommandList> mainCmdList;
mainCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Mock<CommandList> subCmdList;
subCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Graph *testGraphPtr = &testGraph;
captureCommand<CaptureApi::zeCommandListAppendBarrier>(mainCmdList, testGraphPtr, &mainCmdList, &forkEvent, 0U, nullptr);
@@ -520,6 +548,7 @@ TEST_F(GraphDotExporterSimpleStyleTest, GivenCommandWhenGetCommandNodeAttributes
Graph testGraph{&ctx, true};
Mock<Event> event;
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
testGraph.capture<CaptureApi::zeCommandListAppendBarrier>(&cmdlist, &event, 0U, nullptr);
testGraph.stopCapturing();
@@ -531,6 +560,7 @@ TEST_F(GraphDotExporterSimpleStyleTest, GivenCommandWhenGetCommandNodeLabelThenL
Graph testGraph{&ctx, true};
Mock<Event> event;
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
testGraph.capture<CaptureApi::zeCommandListAppendBarrier>(&cmdlist, &event, 0U, nullptr);
testGraph.stopCapturing();
@@ -542,6 +572,7 @@ TEST_F(GraphDotExporterSimpleStyleTest, GivenCommandWhenGetCommandNodeLabelThenL
TEST_F(GraphDotExporterSimpleStyleTest, GivenKernelCommandWhenGetCommandNodeLabelThenLabelIncludesTypeAndName) {
Graph testGraph{&ctx, true};
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
NEO::Device *neoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(NEO::defaultHwInfo.get(), 0));
MockDeviceImp l0Device(neoDevice);
@@ -581,7 +612,9 @@ TEST_F(GraphDotExporterSimpleStyleTest, GivenGraphWithSubgraphsWhenWriteSubgraph
Mock<Event> forkEvent;
Mock<Event> joinEvent;
Mock<CommandList> mainCmdList;
mainCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Mock<CommandList> subCmdList;
subCmdList.cmdListType = L0::CommandList::CommandListType::typeImmediate;
Graph *testGraphPtr = &testGraph;
captureCommand<CaptureApi::zeCommandListAppendBarrier>(mainCmdList, testGraphPtr, &mainCmdList, &forkEvent, 0U, nullptr);
@@ -1261,6 +1294,7 @@ TEST_F(GraphDumpApiTest, GivenValidParametersWithNullpNextWhenZeGraphDumpContent
Graph testGraph{&ctx, true};
Mock<Event> event;
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
testGraph.capture<CaptureApi::zeCommandListAppendBarrier>(&cmdlist, &event, 0U, nullptr);
testGraph.stopCapturing();
@@ -1283,6 +1317,7 @@ TEST_F(GraphDumpApiTest, GivenSimpleStyleExtensionWhenZeGraphDumpContentsExpIsCa
Graph testGraph{&ctx, true};
Mock<Event> event;
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
testGraph.capture<CaptureApi::zeCommandListAppendBarrier>(&cmdlist, &event, 0U, nullptr);
testGraph.stopCapturing();
@@ -1310,6 +1345,7 @@ TEST_F(GraphDumpApiTest, GivenDetailedStyleExtensionWhenZeGraphDumpContentsExpIs
Graph testGraph{&ctx, true};
Mock<Event> event;
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
testGraph.capture<CaptureApi::zeCommandListAppendBarrier>(&cmdlist, &event, 0U, nullptr);
testGraph.stopCapturing();
@@ -1334,6 +1370,7 @@ TEST_F(GraphDumpApiTest, GivenInvalidStyleExtensionWhenZeGraphDumpContentsExpIsC
Graph testGraph{&ctx, true};
Mock<Event> event;
Mock<CommandList> cmdlist;
cmdlist.cmdListType = L0::CommandList::CommandListType::typeImmediate;
testGraph.capture<CaptureApi::zeCommandListAppendBarrier>(&cmdlist, &event, 0U, nullptr);
testGraph.stopCapturing();