Skip to content

Commit

Permalink
feature: ZE_COMMAND_QUEUE_FLAG_IN_ORDER flag support
Browse files Browse the repository at this point in the history
Related-To: NEO-7966

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
  • Loading branch information
BartoszDunajski authored and Compute-Runtime-Automation committed Jul 17, 2023
1 parent 9a53f20 commit ec9afc5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion level_zero/core/source/cmdlist/cmdlist_imp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ CommandList *CommandList::createImmediate(uint32_t productFamily, Device *device
csr->initDirectSubmission();
returnValue = commandList->initialize(device, engineGroupType, desc->flags);

if (NEO::DebugManager.flags.ForceInOrderImmediateCmdListExecution.get() == 1) {
if ((desc->flags & ZE_COMMAND_QUEUE_FLAG_IN_ORDER) || (NEO::DebugManager.flags.ForceInOrderImmediateCmdListExecution.get() == 1)) {
commandList->enableInOrderExecution();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,20 @@ struct InOrderCmdListTests : public CommandListAppendLaunchKernel {
CmdListKernelLaunchParams launchParams = {};
};

HWTEST2_F(InOrderCmdListTests, givenQueueFlagWhenCreatingCmdListThenEnableRelaxedOrdering, IsAtLeastXeHpCore) {
NEO::DebugManager.flags.ForceInOrderImmediateCmdListExecution.set(-1);

ze_command_queue_desc_t cmdQueueDesc = {ZE_STRUCTURE_TYPE_COMMAND_QUEUE_DESC};
cmdQueueDesc.flags = ZE_COMMAND_QUEUE_FLAG_IN_ORDER;

ze_command_list_handle_t cmdList;
EXPECT_EQ(ZE_RESULT_SUCCESS, zeCommandListCreateImmediate(context, device, &cmdQueueDesc, &cmdList));

EXPECT_TRUE(static_cast<CommandListCoreFamilyImmediate<gfxCoreFamily> *>(cmdList)->isInOrderExecutionEnabled());

EXPECT_EQ(ZE_RESULT_SUCCESS, zeCommandListDestroy(cmdList));
}

HWTEST2_F(InOrderCmdListTests, givenInOrderModeWhenResetEventCalledThenResetEventState, IsAtLeastXeHpCore) {
auto immCmdList = createImmCmdList<gfxCoreFamily>();

Expand Down

0 comments on commit ec9afc5

Please sign in to comment.