feature: add debug flag to control graph patch preamble

Related-To: NEO-16434

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2025-10-21 10:06:44 +00:00
committed by Compute-Runtime-Automation
parent 8d8404f59b
commit f2c38ee012
6 changed files with 27 additions and 5 deletions

View File

@@ -1026,7 +1026,8 @@ TEST_F(GraphTestInstantiationTest, WhenInstantiatingGraphThenBakeCommandsIntoCom
EXPECT_EQ(ZE_RESULT_SUCCESS, zeCommandListEndGraphCaptureExp(immCmdListHandle, &srcGraphHandle, nullptr));
ctx.cmdListsToReturn.push_back(new Mock<CommandList>());
ExecutableGraph execGraph;
MockExecutableGraph execGraph;
EXPECT_TRUE(execGraph.usePatchingPreamble);
auto *graphHwCommands = ctx.cmdListsToReturn[0];
EXPECT_EQ(0U, graphHwCommands->appendBarrierCalled);
@@ -1082,6 +1083,16 @@ TEST_F(GraphTestInstantiationTest, WhenInstantiatingGraphThenBakeCommandsIntoCom
EXPECT_EQ(2U, graphHwCommands->appendLaunchKernelWithParametersCalled); // +1 for zeCommandListAppendLaunchKernelWithArguments
}
TEST_F(GraphTestInstantiationTest, GivenGraphPatchPreambleDebugFlagWhenInstantiatingGraphThenUseDebugSettingForPatchPreamble) {
GraphsCleanupGuard graphCleanup;
DebugManagerStateRestore restorer;
debugManager.flags.ForceDisableGraphPatchPreamble.set(1);
MockExecutableGraph execGraph;
EXPECT_FALSE(execGraph.usePatchingPreamble);
}
TEST_F(GraphTestInstantiationTest, givenInOrderCmdListAndRegularCbEventWhenInstantiateToGraphThenDoNotRecordExternalCbEvent) {
GraphsCleanupGuard graphCleanup;

View File

@@ -24,6 +24,7 @@ struct MockExecutableGraph : ExecutableGraph {
using ExecutableGraph::multiEngineGraph;
using ExecutableGraph::myCommandLists;
using ExecutableGraph::submissionChain;
using ExecutableGraph::usePatchingPreamble;
};
} // namespace ult