Skip to content

Commit

Permalink
[L0] Enable Command Buffer usage of UR_L0_USE_DRIVER_INORDER_LISTS
Browse files Browse the repository at this point in the history
Signed-off-by: Neil R. Spruit <[email protected]>
  • Loading branch information
nrspruit committed Dec 4, 2024
1 parent 1ee6774 commit 447b638
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions source/adapters/level_zero/command_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -598,16 +598,15 @@ ur_result_t createMainCommandList(ur_context_handle_t Context,
*/
bool canBeInOrder(ur_context_handle_t Context,
const ur_exp_command_buffer_desc_t *CommandBufferDesc) {
std::ignore = Context;
std::ignore = CommandBufferDesc;
const char *UrRet = std::getenv("UR_L0_USE_DRIVER_INORDER_LISTS");
// In-order command-lists are not available in old driver version.
// bool CompatibleDriver =
// Context->getPlatform()->isDriverVersionNewerOrSimilar(
// 1, 3, L0_DRIVER_INORDER_MIN_VERSION);
// return CompatibleDriver
// ? (CommandBufferDesc ? CommandBufferDesc->isInOrder : false)
// : false;
return false;
bool DriverInOrderRequested = UrRet ? std::atoi(UrRet) != 0 : false;
bool CompatibleDriver = Context->getPlatform()->isDriverVersionNewerOrSimilar(
1, 3, L0_DRIVER_INORDER_MIN_VERSION);
bool CanUseDriverInOrderLists = CompatibleDriver && DriverInOrderRequested;
return CanUseDriverInOrderLists
? (CommandBufferDesc ? CommandBufferDesc->isInOrder : false)
: false;
}

/**
Expand Down

0 comments on commit 447b638

Please sign in to comment.