Skip to content

Commit 5eaf7f3

Browse files
author
Jaime Arteaga
committed
Port Port PI L0 environment variables to UR L0
intel#9300 Signed-off-by: Jaime Arteaga <[email protected]>
1 parent e1e5f63 commit 5eaf7f3

10 files changed

+89
-43
lines changed

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_context.cpp

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urContextRelease(
7373
// Due to a bug with 2D memory copy to and from non-USM pointers, this option is
7474
// disabled by default.
7575
static const bool UseMemcpy2DOperations = [] {
76+
const char *UrRet = std::getenv("UR_L0_USE_NATIVE_USM_MEMCPY2D");
77+
const char *PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_USE_NATIVE_USM_MEMCPY2D");
7678
const char *UseMemcpy2DOperationsFlag =
77-
std::getenv("SYCL_PI_LEVEL_ZERO_USE_NATIVE_USM_MEMCPY2D");
79+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
7880
if (!UseMemcpy2DOperationsFlag)
7981
return false;
8082
return std::stoi(UseMemcpy2DOperationsFlag) > 0;
@@ -409,8 +411,10 @@ ur_result_t ur_context_handle_t_::finalize() {
409411
// here. Setting it to 256 gave best possible performance for several
410412
// benchmarks.
411413
static const pi_uint32 MaxNumEventsPerPool = [] {
412-
const auto MaxNumEventsPerPoolEnv =
413-
std::getenv("ZE_MAX_NUMBER_OF_EVENTS_PER_EVENT_POOL");
414+
const char *UrRet = std::getenv("UR_L0_MAX_NUMBER_OF_EVENTS_PER_EVENT_POOL");
415+
const char *PiRet = std::getenv("ZE_MAX_NUMBER_OF_EVENTS_PER_EVENT_POOL");
416+
const char *MaxNumEventsPerPoolEnv =
417+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
414418
uint32_t Result =
415419
MaxNumEventsPerPoolEnv ? std::atoi(MaxNumEventsPerPoolEnv) : 256;
416420
if (Result <= 0)
@@ -531,8 +535,12 @@ ur_context_handle_t_::decrementUnreleasedEventsInPool(ur_event_handle_t Event) {
531535
// If number of events in the immediate command list exceeds this threshold then
532536
// cleanup process for those events is executed.
533537
static const size_t ImmCmdListsEventCleanupThreshold = [] {
534-
const char *ImmCmdListsEventCleanupThresholdStr = std::getenv(
538+
const char *UrRet =
539+
std::getenv("UR_L0_IMMEDIATE_COMMANDLISTS_EVENT_CLEANUP_THRESHOLD");
540+
const char *PiRet = std::getenv(
535541
"SYCL_PI_LEVEL_ZERO_IMMEDIATE_COMMANDLISTS_EVENT_CLEANUP_THRESHOLD");
542+
const char *ImmCmdListsEventCleanupThresholdStr =
543+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
536544
static constexpr int Default = 1000;
537545
if (!ImmCmdListsEventCleanupThresholdStr)
538546
return Default;
@@ -549,8 +557,11 @@ static const size_t ImmCmdListsEventCleanupThreshold = [] {
549557
// Get value of the threshold for number of active command lists allowed before
550558
// we start heuristically cleaning them up.
551559
static const size_t CmdListsCleanupThreshold = [] {
552-
const char *CmdListsCleanupThresholdStr =
560+
const char *UrRet = std::getenv("UR_L0_COMMANDLISTS_CLEANUP_THRESHOLD");
561+
const char *PiRet =
553562
std::getenv("SYCL_PI_LEVEL_ZERO_COMMANDLISTS_CLEANUP_THRESHOLD");
563+
const char *CmdListsCleanupThresholdStr =
564+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
554565
static constexpr int Default = 20;
555566
if (!CmdListsCleanupThresholdStr)
556567
return Default;

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_device.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
792792
return UR_RESULT_SUCCESS;
793793
}
794794

795-
// SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE can be set to an integer value, or
795+
// UR_L0_USE_COPY_ENGINE can be set to an integer value, or
796796
// a pair of integer values of the form "lower_index:upper_index".
797797
// Here, the indices point to copy engines in a list of all available copy
798798
// engines.
@@ -802,7 +802,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(
802802
// available copy engines can be used.
803803
const std::pair<int, int>
804804
getRangeOfAllowedCopyEngines(const ur_device_handle_t &Device) {
805-
static const char *EnvVar = std::getenv("SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE");
805+
const char *UrRet = std::getenv("UR_L0_USE_COPY_ENGINE");
806+
const char *PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE");
807+
static const char *EnvVar = UrRet ? UrRet : (PiRet ? PiRet : nullptr);
806808
// If the environment variable is not set, no copy engines are used when
807809
// immediate commandlists are being used. For standard commandlists all are
808810
// used.
@@ -825,7 +827,7 @@ getRangeOfAllowedCopyEngines(const ur_device_handle_t &Device) {
825827
int UpperCopyEngineIndex = std::stoi(CopyEngineRange.substr(pos + 1));
826828
if ((LowerCopyEngineIndex > UpperCopyEngineIndex) ||
827829
(LowerCopyEngineIndex < -1) || (UpperCopyEngineIndex < -1)) {
828-
urPrint("SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE: invalid value provided, "
830+
urPrint("UR_L0_LEVEL_ZERO_USE_COPY_ENGINE: invalid value provided, "
829831
"default set.\n");
830832
LowerCopyEngineIndex = 0;
831833
UpperCopyEngineIndex = INT_MAX;
@@ -843,16 +845,20 @@ bool CopyEngineRequested(const ur_device_handle_t &Device) {
843845
// The default is standard commandlists. Setting 1 or 2 specifies use of
844846
// immediate commandlists. Note: when immediate commandlists are used then
845847
// device-only events must be either AllHostVisible or OnDemandHostVisibleProxy.
846-
// (See env var SYCL_PI_LEVEL_ZERO_DEVICE_SCOPE_EVENTS).
848+
// (See env var UR_L0_DEVICE_SCOPE_EVENTS).
847849

848850
// Get value of immediate commandlists env var setting or -1 if unset
849851
ur_device_handle_t_::ImmCmdlistMode
850852
ur_device_handle_t_::useImmediateCommandLists() {
851853
// If immediate commandlist setting is not explicitly set, then use the device
852854
// default.
855+
// TODO: confirm this is good once make_queue revert is added
853856
static const int ImmediateCommandlistsSetting = [] {
854-
const char *ImmediateCommandlistsSettingStr =
857+
const char *UrRet = std::getenv("UR_L0_USE_IMMEDIATE_COMMANDLISTS");
858+
const char *PiRet =
855859
std::getenv("SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS");
860+
const char *ImmediateCommandlistsSettingStr =
861+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
856862
if (!ImmediateCommandlistsSettingStr)
857863
return -1;
858864
return std::stoi(ImmediateCommandlistsSettingStr);
@@ -1122,7 +1128,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDevicePartition(
11221128

11231129
// Sub-Sub-Devices are partitioned by CSlices, not by affinity domain.
11241130
// However, if
1125-
// SYCL_PI_LEVEL_ZERO_EXPOSE_CSLICE_IN_AFFINITY_PARTITIONING overrides that
1131+
// UR_L0_EXPOSE_CSLICE_IN_AFFINITY_PARTITIONING overrides that
11261132
// still expose CSlices in partitioning by affinity domain for compatibility
11271133
// reasons.
11281134
if (Properties[0] == UR_DEVICE_PARTITION_BY_AFFINITY_DOMAIN &&

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_device.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ struct ur_device_handle_t_ : _ur_object {
137137
ImmCmdlistMode ImmCommandListUsed{};
138138

139139
// Scope of events used for events on the device
140-
// Can be adjusted with SYCL_PI_LEVEL_ZERO_DEVICE_SCOPE_EVENTS
140+
// Can be adjusted with UR_L0_DEVICE_SCOPE_EVENTS
141141
// for non-immediate command lists
142142
EventsScope ZeEventsScope = AllHostVisible;
143143

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_event.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ void printZeEventList(const _ur_ze_event_list_t &UrZeEventList) {
2828
// This is an experimental option that allows the use of multiple command lists
2929
// when submitting barriers. The default is 0.
3030
static const bool UseMultipleCmdlistBarriers = [] {
31-
const char *UseMultipleCmdlistBarriersFlag =
31+
const char *UrRet = std::getenv("UR_L0_USE_MULTIPLE_COMMANDLIST_BARRIERS");
32+
const char *PiRet =
3233
std::getenv("SYCL_PI_LEVEL_ZERO_USE_MULTIPLE_COMMANDLIST_BARRIERS");
34+
const char *UseMultipleCmdlistBarriersFlag =
35+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
3336
if (!UseMultipleCmdlistBarriersFlag)
3437
return true;
3538
return std::stoi(UseMultipleCmdlistBarriersFlag) > 0;
@@ -162,7 +165,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueEventsWaitWithBarrier(
162165
// If we have a list of events to make the barrier from, then we can create a
163166
// barrier on these and use the resulting event as our future barrier.
164167
// We use the same approach if
165-
// SYCL_PI_LEVEL_ZERO_USE_MULTIPLE_COMMANDLIST_BARRIERS is not set to a
168+
// UR_L0_USE_MULTIPLE_COMMANDLIST_BARRIERS is not set to a
166169
// positive value.
167170
// We use the same approach if we have in-order queue because every command
168171
// depends on previous one, so we don't need to insert barrier to multiple

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_event.hpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ ur_result_t EventCreate(ur_context_handle_t Context, ur_queue_handle_t Queue,
3535
// This is an experimental option that allows to disable caching of events in
3636
// the context.
3737
const bool DisableEventsCaching = [] {
38+
const char *UrRet = std::getenv("UR_L0_DISABLE_EVENTS_CACHING");
39+
const char *PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_DISABLE_EVENTS_CACHING");
3840
const char *DisableEventsCachingFlag =
39-
std::getenv("SYCL_PI_LEVEL_ZERO_DISABLE_EVENTS_CACHING");
41+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
4042
if (!DisableEventsCachingFlag)
4143
return false;
4244
return std::stoi(DisableEventsCachingFlag) != 0;
@@ -45,8 +47,10 @@ const bool DisableEventsCaching = [] {
4547
// This is an experimental option that allows reset and reuse of uncompleted
4648
// events in the in-order queue with discard_events property.
4749
const bool ReuseDiscardedEvents = [] {
50+
const char *UrRet = std::getenv("UR_L0_REUSE_DISCARDED_EVENTS");
51+
const char *PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_REUSE_DISCARDED_EVENTS");
4852
const char *ReuseDiscardedEventsFlag =
49-
std::getenv("SYCL_PI_LEVEL_ZERO_REUSE_DISCARDED_EVENTS");
53+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
5054
if (!ReuseDiscardedEventsFlag)
5155
return true;
5256
return std::stoi(ReuseDiscardedEventsFlag) > 0;
@@ -236,8 +240,10 @@ ur_result_t CleanupCompletedEvent(ur_event_handle_t Event,
236240

237241
// Get value of device scope events env var setting or default setting
238242
static const EventsScope DeviceEventsSetting = [] {
243+
char *UrRet = std::getenv("UR_L0_DEVICE_SCOPE_EVENTS");
244+
char *PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_DEVICE_SCOPE_EVENTS");
239245
const char *DeviceEventsSettingStr =
240-
std::getenv("SYCL_PI_LEVEL_ZERO_DEVICE_SCOPE_EVENTS");
246+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
241247
if (DeviceEventsSettingStr) {
242248
// Override the default if user has explicitly chosen the events scope.
243249
switch (std::stoi(DeviceEventsSettingStr)) {

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_mem.cpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
// Default to using compute engine for fill operation, but allow to
1919
// override this with an environment variable.
2020
static bool PreferCopyEngine = [] {
21-
const char *Env = std::getenv("SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE_FOR_FILL");
22-
return Env ? std::stoi(Env) != 0 : false;
21+
const char *UrRet = std::getenv("UR_L0_USE_COPY_ENGINE_FOR_FILL");
22+
const char *PiRet =
23+
std::getenv("SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE_FOR_FILL");
24+
return (UrRet ? std::stoi(UrRet) : (PiRet ? std::stoi(PiRet) : 0));
2325
}();
2426

2527
// Helper function to check if a pointer is a device pointer.
@@ -2433,7 +2435,9 @@ enum class USMAllocationForceResidencyType {
24332435

24342436
// Returns the desired USM residency setting
24352437
static USMAllocationForceResidencyType USMAllocationForceResidency = [] {
2436-
const auto Str = std::getenv("SYCL_PI_LEVEL_ZERO_USM_RESIDENT");
2438+
const char *UrRet = std::getenv("UR_L0_USM_RESIDENT");
2439+
const char *PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_USM_RESIDENT");
2440+
const char *Str = UrRet ? UrRet : (PiRet ? PiRet : nullptr);
24372441
if (!Str)
24382442
return USMAllocationForceResidencyType::P2PDevices;
24392443
switch (std::atoi(Str)) {
@@ -2861,8 +2865,11 @@ ur_result_t _ur_buffer::getZeHandle(char *&ZeHandle, access_mode_t AccessMode,
28612865
// cross-tile traffic.
28622866
//
28632867
static const bool SingleRootDeviceBufferMigration = [] {
2864-
const char *EnvStr =
2868+
const char *UrRet =
2869+
std::getenv("UR_L0_SINGLE_ROOT_DEVICE_BUFFER_MIGRATION");
2870+
const char *PiRet =
28652871
std::getenv("SYCL_PI_LEVEL_ZERO_SINGLE_ROOT_DEVICE_BUFFER_MIGRATION");
2872+
const char *EnvStr = UrRet ? UrRet : (PiRet ? PiRet : nullptr);
28662873
if (EnvStr)
28672874
return (std::stoi(EnvStr) != 0);
28682875
// The default is to migrate normally, which may not always be the

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_mem.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ bool IsDevicePointer(ur_context_handle_t Context, const void *Ptr);
3131
// This is an experimental option to test performance of device to device copy
3232
// operations on copy engines (versus compute engine)
3333
const bool UseCopyEngineForD2DCopy = [] {
34-
const char *CopyEngineForD2DCopy =
34+
const char *UrRet = std::getenv("UR_L0_USE_COPY_ENGINE_FOR_D2D_COPY");
35+
const char *PiRet =
3536
std::getenv("SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE_FOR_D2D_COPY");
37+
const char *CopyEngineForD2DCopy = UrRet ? UrRet : (PiRet ? PiRet : nullptr);
3638
return (CopyEngineForD2DCopy && (std::stoi(CopyEngineForD2DCopy) != 0));
3739
}();
3840

sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero_queue.cpp

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urQueueGetInfo(
260260
// paths be less likely affected.
261261
//
262262
static bool doEagerInit = [] {
263-
const char *EagerInit = std::getenv("SYCL_EAGER_INIT");
263+
const char *UrRet = std::getenv("UR_L0_EAGER_INIT");
264+
const char *PiRet = std::getenv("SYCL_EAGER_INIT");
265+
const char *EagerInit = UrRet ? UrRet : (PiRet ? PiRet : nullptr);
264266
return EagerInit ? std::atoi(EagerInit) != 0 : false;
265267
}();
266268

@@ -549,8 +551,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urQueueFinish(
549551
// TODO: this currently exhibits some issues in the driver, so
550552
// we control this with an env var. Remove this control when
551553
// we settle one way or the other.
554+
const char *UrRet = std::getenv("UR_L0_QUEUE_FINISH_HOLD_LOCK");
555+
const char *PiRet =
556+
std::getenv("SYCL_PI_LEVEL_ZERO_QUEUE_FINISH_HOLD_LOCK");
552557
static bool HoldLock =
553-
std::getenv("SYCL_PI_LEVEL_ZERO_QUEUE_FINISH_HOLD_LOCK") != nullptr;
558+
UrRet ? std::stoi(UrRet) : (PiRet ? std::stoi(PiRet) : 0);
554559
if (!HoldLock) {
555560
Lock.unlock();
556561
}
@@ -623,9 +628,16 @@ static const zeCommandListBatchConfig ZeCommandListBatchConfig(bool IsCopy) {
623628
zeCommandListBatchConfig Config{}; // default initialize
624629

625630
// Default value of 0. This specifies to use dynamic batch size adjustment.
626-
const auto BatchSizeStr =
627-
(IsCopy) ? std::getenv("SYCL_PI_LEVEL_ZERO_COPY_BATCH_SIZE")
628-
: std::getenv("SYCL_PI_LEVEL_ZERO_BATCH_SIZE");
631+
const char *UrRet = nullptr;
632+
const char *PiRet = nullptr;
633+
if (IsCopy) {
634+
UrRet = std::getenv("UR_L0_COPY_BATCH_SIZE");
635+
PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_COPY_BATCH_SIZE");
636+
} else {
637+
UrRet = std::getenv("UR_L0_BATCH_SIZE");
638+
PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_BATCH_SIZE");
639+
}
640+
const char *BatchSizeStr = UrRet ? UrRet : (PiRet ? PiRet : nullptr);
629641
if (BatchSizeStr) {
630642
pi_int32 BatchSizeStrVal = std::atoi(BatchSizeStr);
631643
// Level Zero may only support a limted number of commands per command
@@ -658,10 +670,9 @@ static const zeCommandListBatchConfig ZeCommandListBatchConfig(bool IsCopy) {
658670
Val = std::stoi(BatchConfig.substr(Pos));
659671
} catch (...) {
660672
if (IsCopy)
661-
urPrint(
662-
"SYCL_PI_LEVEL_ZERO_COPY_BATCH_SIZE: failed to parse value\n");
673+
urPrint("UR_L0_COPY_BATCH_SIZE: failed to parse value\n");
663674
else
664-
urPrint("SYCL_PI_LEVEL_ZERO_BATCH_SIZE: failed to parse value\n");
675+
urPrint("UR_L0_BATCH_SIZE: failed to parse value\n");
665676
break;
666677
}
667678
switch (Ord) {
@@ -684,36 +695,36 @@ static const zeCommandListBatchConfig ZeCommandListBatchConfig(bool IsCopy) {
684695
die("Unexpected batch config");
685696
}
686697
if (IsCopy)
687-
urPrint("SYCL_PI_LEVEL_ZERO_COPY_BATCH_SIZE: dynamic batch param "
698+
urPrint("UR_L0_COPY_BATCH_SIZE: dynamic batch param "
688699
"#%d: %d\n",
689700
(int)Ord, (int)Val);
690701
else
691-
urPrint(
692-
"SYCL_PI_LEVEL_ZERO_BATCH_SIZE: dynamic batch param #%d: %d\n",
693-
(int)Ord, (int)Val);
702+
urPrint("UR_L0_BATCH_SIZE: dynamic batch param #%d: %d\n", (int)Ord,
703+
(int)Val);
694704
};
695705

696706
} else {
697707
// Negative batch sizes are silently ignored.
698708
if (IsCopy)
699-
urPrint("SYCL_PI_LEVEL_ZERO_COPY_BATCH_SIZE: ignored negative value\n");
709+
urPrint("UR_L0_COPY_BATCH_SIZE: ignored negative value\n");
700710
else
701-
urPrint("SYCL_PI_LEVEL_ZERO_BATCH_SIZE: ignored negative value\n");
711+
urPrint("UR_L0_BATCH_SIZE: ignored negative value\n");
702712
}
703713
}
704714
return Config;
705715
}
706716

707-
// SYCL_PI_LEVEL_ZERO_USE_COMPUTE_ENGINE can be set to an integer (>=0) in
717+
// UR_L0_LEVEL_ZERO_USE_COMPUTE_ENGINE can be set to an integer (>=0) in
708718
// which case all compute commands will be submitted to the command-queue
709719
// with the given index in the compute command group. If it is instead set
710720
// to negative then all available compute engines may be used.
711721
//
712722
// The default value is "0".
713723
//
714724
static const std::pair<int, int> getRangeOfAllowedComputeEngines() {
715-
static const char *EnvVar =
716-
std::getenv("SYCL_PI_LEVEL_ZERO_USE_COMPUTE_ENGINE");
725+
const char *UrRet = std::getenv("UR_L0_USE_COMPUTE_ENGINE");
726+
const char *PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_USE_COMPUTE_ENGINE");
727+
const char *EnvVar = UrRet ? UrRet : (PiRet ? PiRet : nullptr);
717728
// If the environment variable is not set only use "0" CCS for now.
718729
// TODO: allow all CCSs when HW support is complete.
719730
if (!EnvVar)
@@ -1769,8 +1780,11 @@ ur_result_t ur_queue_handle_t_::insertStartBarrierIfDiscardEventsMode(
17691780
// available in the device, in Level Zero plugin for copy operations submitted
17701781
// to an in-order queue. The default is 1.
17711782
static const bool UseCopyEngineForInOrderQueue = [] {
1772-
const char *CopyEngineForInOrderQueue =
1783+
const char *UrRet = std::getenv("UR_L0_USE_COPY_ENGINE_FOR_IN_ORDER_QUEUE");
1784+
const char *PiRet =
17731785
std::getenv("SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE_FOR_IN_ORDER_QUEUE");
1786+
const char *CopyEngineForInOrderQueue =
1787+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
17741788
return (!CopyEngineForInOrderQueue ||
17751789
(std::stoi(CopyEngineForInOrderQueue) != 0));
17761790
}();

sycl/plugins/unified_runtime/ur/ur.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ bool PrintTrace = [] {
1515
const char *UrRet = std::getenv("UR_L0_TRACE");
1616
const char *PiRet = std::getenv("SYCL_PI_TRACE");
1717
const char *Trace = UrRet ? UrRet : (PiRet ? PiRet : nullptr);
18-
1918
const int TraceValue = Trace ? std::stoi(Trace) : 0;
2019
if (TraceValue == -1 || TraceValue == 2) { // Means print all traces
2120
return true;

sycl/plugins/unified_runtime/ur/usm_allocator_config.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ USMAllocatorConfig::USMAllocatorConfig() {
184184
const char *UrRet = std::getenv("UR_L0_USM_ALLOCATOR");
185185
const char *PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_USM_ALLOCATOR");
186186
const char *PoolParams = UrRet ? UrRet : (PiRet ? PiRet : nullptr);
187-
188187
if (PoolParams != nullptr) {
189188
std::string Params(PoolParams);
190189
size_t Pos = Params.find(';');
@@ -229,7 +228,6 @@ USMAllocatorConfig::USMAllocatorConfig() {
229228
const char *PoolTraceVal =
230229
UrRetUsmAllocator ? UrRetUsmAllocator
231230
: (PiRetUsmAllocator ? PiRetUsmAllocator : nullptr);
232-
233231
int PoolTrace = 0;
234232
if (PoolTraceVal != nullptr) {
235233
PoolTrace = std::atoi(PoolTraceVal);

0 commit comments

Comments
 (0)