Skip to content

Commit

Permalink
Merge pull request #2416 from nrspruit/disable_driver_inorderlists
Browse files Browse the repository at this point in the history
[L0] Disabling Driver In Order Lists by default
  • Loading branch information
nrspruit committed Dec 4, 2024
1 parent 973199d commit a52f35f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion source/adapters/level_zero/command_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,10 +609,13 @@ ur_result_t createMainCommandList(ur_context_handle_t Context,
*/
bool canBeInOrder(ur_context_handle_t Context,
const ur_exp_command_buffer_desc_t *CommandBufferDesc) {
const char *UrRet = std::getenv("UR_L0_USE_DRIVER_INORDER_LISTS");
// In-order command-lists are not available in old driver version.
bool DriverInOrderRequested = UrRet ? std::atoi(UrRet) != 0 : false;
bool CompatibleDriver = Context->getPlatform()->isDriverVersionNewerOrSimilar(
1, 3, L0_DRIVER_INORDER_MIN_VERSION);
return CompatibleDriver
bool CanUseDriverInOrderLists = CompatibleDriver && DriverInOrderRequested;
return CanUseDriverInOrderLists
? (CommandBufferDesc ? CommandBufferDesc->isInOrder : false)
: false;
}
Expand Down
6 changes: 3 additions & 3 deletions source/adapters/level_zero/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1204,10 +1204,10 @@ bool ur_device_handle_t_::useDriverInOrderLists() {

static const bool UseDriverInOrderLists = [&] {
const char *UrRet = std::getenv("UR_L0_USE_DRIVER_INORDER_LISTS");
bool CompatibleDriver = this->Platform->isDriverVersionNewerOrSimilar(
1, 3, L0_DRIVER_INORDER_MIN_VERSION);
// bool CompatibleDriver = this->Platform->isDriverVersionNewerOrSimilar(
// 1, 3, L0_DRIVER_INORDER_MIN_VERSION);
if (!UrRet)
return CompatibleDriver;
return false;
return std::atoi(UrRet) != 0;
}();

Expand Down

0 comments on commit a52f35f

Please sign in to comment.