File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
unified-runtime/source/adapters/level_zero Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -503,21 +503,17 @@ bool ur_platform_handle_t_::allowDriverInOrderLists(bool OnlyIfRequested) {
503503#define L0_DRIVER_INORDER_MINOR_VERSION 6
504504#define L0_DRIVER_INORDER_PATCH_VERSION 32149
505505
506- static const bool UseDriverInOrderLists = [&] {
506+ static const bool UseEnvVarDriverInOrderLists = [&] {
507507 const char *UrRet = std::getenv (" UR_L0_USE_DRIVER_INORDER_LISTS" );
508+ return UrRet ? std::atoi (UrRet) != 0 : false ;
509+ }();
510+ static const bool UseDriverInOrderLists = [this ] {
508511 bool CompatibleDriver = this ->isDriverVersionNewerOrSimilar (
509512 1 , L0_DRIVER_INORDER_MINOR_VERSION, L0_DRIVER_INORDER_PATCH_VERSION);
510- bool DriverInOrderRequested = UrRet ? std::atoi (UrRet) != 0 : false ;
511- bool CanUseDriverInOrderLists = CompatibleDriver || DriverInOrderRequested;
512- return CanUseDriverInOrderLists;
513+ return CompatibleDriver || UseEnvVarDriverInOrderLists;
513514 }();
514515
515- if (OnlyIfRequested) {
516- const char *UrRet = std::getenv (" UR_L0_USE_DRIVER_INORDER_LISTS" );
517- bool DriverInOrderRequested = UrRet ? std::atoi (UrRet) != 0 : false ;
518- return DriverInOrderRequested;
519- }
520- return UseDriverInOrderLists;
516+ return OnlyIfRequested ? UseEnvVarDriverInOrderLists : UseDriverInOrderLists;
521517}
522518
523519// / Checks the version of the level-zero driver.
You can’t perform that action at this time.
0 commit comments