Skip to content

Commit d1cdeba

Browse files
author
Jaime Arteaga
committed
[SYCL][UR][L0] Port PI L0 environment variables to UR L0
Signed-off-by: Jaime Arteaga <[email protected]>
1 parent 4891167 commit d1cdeba

File tree

9 files changed

+142
-57
lines changed

9 files changed

+142
-57
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 96 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,37 @@ namespace {
4747
// This is an experimental option to test performance of device to device copy
4848
// operations on copy engines (versus compute engine)
4949
static const bool UseCopyEngineForD2DCopy = [] {
50-
const char *CopyEngineForD2DCopy =
50+
const char *UrRet = std::getenv("UR_L0_USE_COPY_ENGINE_FOR_D2D_COPY");
51+
const char *PiRet =
5152
std::getenv("SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE_FOR_D2D_COPY");
53+
const char *CopyEngineForD2DCopy = UrRet ? UrRet : (PiRet ? PiRet : nullptr);
54+
5255
return (CopyEngineForD2DCopy && (std::stoi(CopyEngineForD2DCopy) != 0));
5356
}();
5457

5558
// This is an experimental option that allows the use of copy engine, if
5659
// available in the device, in Level Zero plugin for copy operations submitted
5760
// to an in-order queue. The default is 1.
5861
static const bool UseCopyEngineForInOrderQueue = [] {
59-
const char *CopyEngineForInOrderQueue =
62+
const char *UrRet = std::getenv("UR_L0_USE_COPY_ENGINE_FOR_IN_ORDER_QUEUE");
63+
const char *PiRet =
6064
std::getenv("SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE_FOR_IN_ORDER_QUEUE");
65+
const char *CopyEngineForInOrderQueue =
66+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
67+
6168
return (!CopyEngineForInOrderQueue ||
6269
(std::stoi(CopyEngineForInOrderQueue) != 0));
6370
}();
6471

6572
// This is an experimental option that allows the use of multiple command lists
6673
// when submitting barriers. The default is 0.
6774
static const bool UseMultipleCmdlistBarriers = [] {
68-
const char *UseMultipleCmdlistBarriersFlag =
75+
const char *UrRet = std::getenv("UR_L0_USE_MULTIPLE_COMMANDLIST_BARRIERS");
76+
const char *PiRet =
6977
std::getenv("SYCL_PI_LEVEL_ZERO_USE_MULTIPLE_COMMANDLIST_BARRIERS");
78+
const char *UseMultipleCmdlistBarriersFlag =
79+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
80+
7081
if (!UseMultipleCmdlistBarriersFlag)
7182
return true;
7283
return std::stoi(UseMultipleCmdlistBarriersFlag) > 0;
@@ -75,8 +86,11 @@ static const bool UseMultipleCmdlistBarriers = [] {
7586
// This is an experimental option that allows to disable caching of events in
7687
// the context.
7788
static const bool DisableEventsCaching = [] {
89+
const char *UrRet = std::getenv("UR_L0_DISABLE_EVENTS_CACHING");
90+
const char *PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_DISABLE_EVENTS_CACHING");
7891
const char *DisableEventsCachingFlag =
79-
std::getenv("SYCL_PI_LEVEL_ZERO_DISABLE_EVENTS_CACHING");
92+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
93+
8094
if (!DisableEventsCachingFlag)
8195
return false;
8296
return std::stoi(DisableEventsCachingFlag) != 0;
@@ -85,8 +99,11 @@ static const bool DisableEventsCaching = [] {
8599
// This is an experimental option that allows reset and reuse of uncompleted
86100
// events in the in-order queue with discard_events property.
87101
static const bool ReuseDiscardedEvents = [] {
102+
const char *UrRet = std::getenv("UR_L0_REUSE_DISCARDED_EVENTS");
103+
const char *PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_REUSE_DISCARDED_EVENTS");
88104
const char *ReuseDiscardedEventsFlag =
89-
std::getenv("SYCL_PI_LEVEL_ZERO_REUSE_DISCARDED_EVENTS");
105+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
106+
90107
if (!ReuseDiscardedEventsFlag)
91108
return true;
92109
return std::stoi(ReuseDiscardedEventsFlag) > 0;
@@ -95,8 +112,11 @@ static const bool ReuseDiscardedEvents = [] {
95112
// Due to a bug with 2D memory copy to and from non-USM pointers, this option is
96113
// disabled by default.
97114
static const bool UseMemcpy2DOperations = [] {
115+
const char *UrRet = std::getenv("UR_L0_USE_NATIVE_USM_MEMCPY2D");
116+
const char *PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_USE_NATIVE_USM_MEMCPY2D");
98117
const char *UseMemcpy2DOperationsFlag =
99-
std::getenv("SYCL_PI_LEVEL_ZERO_USE_NATIVE_USM_MEMCPY2D");
118+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
119+
100120
if (!UseMemcpy2DOperationsFlag)
101121
return false;
102122
return std::stoi(UseMemcpy2DOperationsFlag) > 0;
@@ -130,16 +150,21 @@ static inline pi_result mapError(ze_result_t Result) {
130150
// paths be less likely affected.
131151
//
132152
static bool doEagerInit = [] {
133-
const char *EagerInit = std::getenv("SYCL_EAGER_INIT");
153+
const char *UrRet = std::getenv("UR_L0_EAGER_INIT");
154+
const char *PiRet = std::getenv("SYCL_EAGER_INIT");
155+
const char *EagerInit = UrRet ? UrRet : (PiRet ? PiRet : nullptr);
134156
return EagerInit ? std::atoi(EagerInit) != 0 : false;
135157
}();
136158

137159
// Maximum number of events that can be present in an event ZePool is captured
138160
// here. Setting it to 256 gave best possible performance for several
139161
// benchmarks.
140162
static const pi_uint32 MaxNumEventsPerPool = [] {
141-
const auto MaxNumEventsPerPoolEnv =
142-
std::getenv("ZE_MAX_NUMBER_OF_EVENTS_PER_EVENT_POOL");
163+
const char *UrRet = std::getenv("UR_L0_MAX_NUMBER_OF_EVENTS_PER_EVENT_POOL");
164+
const char *PiRet = std::getenv("ZE_MAX_NUMBER_OF_EVENTS_PER_EVENT_POOL");
165+
const char *MaxNumEventsPerPoolEnv =
166+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
167+
143168
pi_uint32 Result =
144169
MaxNumEventsPerPoolEnv ? std::atoi(MaxNumEventsPerPoolEnv) : 256;
145170
if (Result <= 0)
@@ -177,16 +202,18 @@ template <> ze_result_t zeHostSynchronize(ze_command_queue_handle_t Handle) {
177202

178203
} // anonymous namespace
179204

180-
// SYCL_PI_LEVEL_ZERO_USE_COMPUTE_ENGINE can be set to an integer (>=0) in
205+
// UR_L0_LEVEL_ZERO_USE_COMPUTE_ENGINE can be set to an integer (>=0) in
181206
// which case all compute commands will be submitted to the command-queue
182207
// with the given index in the compute command group. If it is instead set
183208
// to negative then all available compute engines may be used.
184209
//
185210
// The default value is "0".
186211
//
187212
static const std::pair<int, int> getRangeOfAllowedComputeEngines() {
188-
static const char *EnvVar =
189-
std::getenv("SYCL_PI_LEVEL_ZERO_USE_COMPUTE_ENGINE");
213+
const char *UrRet = std::getenv("UR_L0_USE_COMPUTE_ENGINE");
214+
const char *PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_USE_COMPUTE_ENGINE");
215+
const char *EnvVar = UrRet ? UrRet : (PiRet ? PiRet : nullptr);
216+
190217
// If the environment variable is not set only use "0" CCS for now.
191218
// TODO: allow all CCSs when HW support is complete.
192219
if (!EnvVar)
@@ -466,8 +493,13 @@ pi_result _pi_queue::addEventToQueueCache(pi_event Event) {
466493
// If number of events in the immediate command list exceeds this threshold then
467494
// cleanup process for those events is executed.
468495
static const size_t ImmCmdListsEventCleanupThreshold = [] {
469-
const char *ImmCmdListsEventCleanupThresholdStr = std::getenv(
496+
const char *UrRet =
497+
std::getenv("UR_L0_IMMEDIATE_COMMANDLISTS_EVENT_CLEANUP_THRESHOLD");
498+
const char *PiRet = std::getenv(
470499
"SYCL_PI_LEVEL_ZERO_IMMEDIATE_COMMANDLISTS_EVENT_CLEANUP_THRESHOLD");
500+
const char *ImmCmdListsEventCleanupThresholdStr =
501+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
502+
471503
static constexpr int Default = 1000;
472504
if (!ImmCmdListsEventCleanupThresholdStr)
473505
return Default;
@@ -484,8 +516,12 @@ static const size_t ImmCmdListsEventCleanupThreshold = [] {
484516
// Get value of the threshold for number of active command lists allowed before
485517
// we start heuristically cleaning them up.
486518
static const size_t CmdListsCleanupThreshold = [] {
487-
const char *CmdListsCleanupThresholdStr =
519+
const char *UrRet = std::getenv("UR_L0_COMMANDLISTS_CLEANUP_THRESHOLD");
520+
const char *PiRet =
488521
std::getenv("SYCL_PI_LEVEL_ZERO_COMMANDLISTS_CLEANUP_THRESHOLD");
522+
const char *CmdListsCleanupThresholdStr =
523+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
524+
489525
static constexpr int Default = 20;
490526
if (!CmdListsCleanupThresholdStr)
491527
return Default;
@@ -826,9 +862,17 @@ static const zeCommandListBatchConfig ZeCommandListBatchConfig(bool IsCopy) {
826862
zeCommandListBatchConfig Config{}; // default initialize
827863

828864
// Default value of 0. This specifies to use dynamic batch size adjustment.
829-
const auto BatchSizeStr =
830-
(IsCopy) ? std::getenv("SYCL_PI_LEVEL_ZERO_COPY_BATCH_SIZE")
831-
: std::getenv("SYCL_PI_LEVEL_ZERO_BATCH_SIZE");
865+
const char *UrRet = nullptr;
866+
const char *PiRet = nullptr;
867+
if (IsCopy) {
868+
UrRet = std::getenv("UR_L0_COPY_BATCH_SIZE");
869+
PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_COPY_BATCH_SIZE");
870+
} else {
871+
UrRet = std::getenv("UR_L0_BATCH_SIZE");
872+
PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_BATCH_SIZE");
873+
}
874+
const char *BatchSizeStr = UrRet ? UrRet : (PiRet ? PiRet : nullptr);
875+
832876
if (BatchSizeStr) {
833877
pi_int32 BatchSizeStrVal = std::atoi(BatchSizeStr);
834878
// Level Zero may only support a limted number of commands per command
@@ -861,10 +905,9 @@ static const zeCommandListBatchConfig ZeCommandListBatchConfig(bool IsCopy) {
861905
Val = std::stoi(BatchConfig.substr(Pos));
862906
} catch (...) {
863907
if (IsCopy)
864-
urPrint(
865-
"SYCL_PI_LEVEL_ZERO_COPY_BATCH_SIZE: failed to parse value\n");
908+
urPrint("UR_L0_COPY_BATCH_SIZE: failed to parse value\n");
866909
else
867-
urPrint("SYCL_PI_LEVEL_ZERO_BATCH_SIZE: failed to parse value\n");
910+
urPrint("UR_L0_BATCH_SIZE: failed to parse value\n");
868911
break;
869912
}
870913
switch (Ord) {
@@ -887,21 +930,20 @@ static const zeCommandListBatchConfig ZeCommandListBatchConfig(bool IsCopy) {
887930
die("Unexpected batch config");
888931
}
889932
if (IsCopy)
890-
urPrint("SYCL_PI_LEVEL_ZERO_COPY_BATCH_SIZE: dynamic batch param "
933+
urPrint("UR_L0_COPY_BATCH_SIZE: dynamic batch param "
891934
"#%d: %d\n",
892935
(int)Ord, (int)Val);
893936
else
894-
urPrint(
895-
"SYCL_PI_LEVEL_ZERO_BATCH_SIZE: dynamic batch param #%d: %d\n",
896-
(int)Ord, (int)Val);
937+
urPrint("UR_L0_BATCH_SIZE: dynamic batch param #%d: %d\n", (int)Ord,
938+
(int)Val);
897939
};
898940

899941
} else {
900942
// Negative batch sizes are silently ignored.
901943
if (IsCopy)
902-
urPrint("SYCL_PI_LEVEL_ZERO_COPY_BATCH_SIZE: ignored negative value\n");
944+
urPrint("UR_L0_COPY_BATCH_SIZE: ignored negative value\n");
903945
else
904-
urPrint("SYCL_PI_LEVEL_ZERO_BATCH_SIZE: ignored negative value\n");
946+
urPrint("UR_L0_BATCH_SIZE: ignored negative value\n");
905947
}
906948
}
907949
return Config;
@@ -922,7 +964,10 @@ static const zeCommandListBatchConfig ZeCommandListBatchCopyConfig = [] {
922964
// Temporarily check whether immediate command list env var has been set. This
923965
// affects default behavior of make_queue API.
924966
static const bool ImmediateCommandlistEnvVarIsSet = [] {
925-
return std::getenv("SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS");
967+
const char *UrRet = std::getenv("UR_L0_USE_IMMEDIATE_COMMANDLISTS");
968+
const char *PiRet =
969+
std::getenv("SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS");
970+
return (UrRet ? std::stoi(UrRet) : (PiRet ? std::stoi(PiRet) : 0));
926971
}();
927972

928973
_pi_queue::_pi_queue(std::vector<ze_command_queue_handle_t> &ComputeQueues,
@@ -1893,9 +1938,9 @@ pi_result _pi_queue::executeOpenCommandList(bool IsCopy) {
18931938
}
18941939

18951940
static const bool FilterEventWaitList = [] {
1896-
const char *Ret = std::getenv("SYCL_PI_LEVEL_ZERO_FILTER_EVENT_WAIT_LIST");
1897-
const bool RetVal = Ret ? std::stoi(Ret) : 0;
1898-
return RetVal;
1941+
const char *UrRet = std::getenv("UR_L0_FILTER_EVENT_WAIT_LIST");
1942+
const char *PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_FILTER_EVENT_WAIT_LIST");
1943+
return (UrRet ? std::stoi(UrRet) : (PiRet ? std::stoi(PiRet) : 0));
18991944
}();
19001945

19011946
pi_result _pi_ze_event_list_t::createAndRetainPiZeEventList(
@@ -2398,7 +2443,7 @@ pi_result piContextGetInfo(pi_context Context, pi_context_info ParamName,
23982443
return ReturnValue(pi_uint32{Context->RefCount.load()});
23992444
case PI_EXT_ONEAPI_CONTEXT_INFO_USM_MEMCPY2D_SUPPORT:
24002445
// 2D USM memcpy is supported unless disabled through
2401-
// SYCL_PI_LEVEL_ZERO_USE_NATIVE_USM_MEMCPY2D.
2446+
// UR_L0_LEVEL_ZERO_USE_NATIVE_USM_MEMCPY2D.
24022447
return ReturnValue(pi_bool{UseMemcpy2DOperations});
24032448
case PI_EXT_ONEAPI_CONTEXT_INFO_USM_FILL2D_SUPPORT:
24042449
case PI_EXT_ONEAPI_CONTEXT_INFO_USM_MEMSET2D_SUPPORT:
@@ -2901,8 +2946,12 @@ pi_result piQueueFinish(pi_queue Queue) {
29012946
// TODO: this currently exhibits some issues in the driver, so
29022947
// we control this with an env var. Remove this control when
29032948
// we settle one way or the other.
2904-
static bool HoldLock =
2905-
std::getenv("SYCL_PI_LEVEL_ZERO_QUEUE_FINISH_HOLD_LOCK") != nullptr;
2949+
const char *UrRet = std::getenv("UR_L0_QUEUE_FINISH_HOLD_LOCK");
2950+
const char *PiRet =
2951+
std::getenv("SYCL_PI_LEVEL_ZERO_QUEUE_FINISH_HOLD_LOCK");
2952+
const bool HoldLock =
2953+
UrRet ? std::stoi(UrRet) : (PiRet ? std::stoi(PiRet) : 0);
2954+
29062955
if (!HoldLock) {
29072956
Lock.unlock();
29082957
}
@@ -5793,7 +5842,7 @@ pi_result piEnqueueEventsWaitWithBarrier(pi_queue Queue,
57935842
// If we have a list of events to make the barrier from, then we can create a
57945843
// barrier on these and use the resulting event as our future barrier.
57955844
// We use the same approach if
5796-
// SYCL_PI_LEVEL_ZERO_USE_MULTIPLE_COMMANDLIST_BARRIERS is not set to a
5845+
// UR_L0_USE_MULTIPLE_COMMANDLIST_BARRIERS is not set to a
57975846
// positive value.
57985847
// We use the same approach if we have in-order queue because every command
57995848
// depends on previous one, so we don't need to insert barrier to multiple
@@ -6346,8 +6395,10 @@ pi_result piEnqueueMemBufferCopyRect(
63466395
// Default to using compute engine for fill operation, but allow to
63476396
// override this with an environment variable.
63486397
static bool PreferCopyEngine = [] {
6349-
const char *Env = std::getenv("SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE_FOR_FILL");
6350-
return Env ? std::stoi(Env) != 0 : false;
6398+
const char *UrRet = std::getenv("UR_L0_USE_COPY_ENGINE_FOR_FILL");
6399+
const char *PiRet =
6400+
std::getenv("SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE_FOR_FILL");
6401+
return (UrRet ? std::stoi(UrRet) : (PiRet ? std::stoi(PiRet) : 0));
63516402
}();
63526403

63536404
// PI interfaces must have queue's and buffer's mutexes locked on entry.
@@ -7188,7 +7239,10 @@ enum class USMAllocationForceResidencyType {
71887239

71897240
// Returns the desired USM residency setting
71907241
static USMAllocationForceResidencyType USMAllocationForceResidency = [] {
7191-
const auto Str = std::getenv("SYCL_PI_LEVEL_ZERO_USM_RESIDENT");
7242+
const char *UrRet = std::getenv("UR_L0_USM_RESIDENT");
7243+
const char *PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_USM_RESIDENT");
7244+
const char *Str = UrRet ? UrRet : (PiRet ? PiRet : nullptr);
7245+
71927246
if (!Str)
71937247
return USMAllocationForceResidencyType::P2PDevices;
71947248
switch (std::atoi(Str)) {
@@ -8599,8 +8653,12 @@ pi_result _pi_buffer::getZeHandle(char *&ZeHandle, access_mode_t AccessMode,
85998653
// cross-tile traffic.
86008654
//
86018655
static const bool SingleRootDeviceBufferMigration = [] {
8602-
const char *EnvStr =
8656+
const char *UrRet =
8657+
std::getenv("UR_L0_SINGLE_ROOT_DEVICE_BUFFER_MIGRATION");
8658+
const char *PiRet =
86038659
std::getenv("SYCL_PI_LEVEL_ZERO_SINGLE_ROOT_DEVICE_BUFFER_MIGRATION");
8660+
const char *EnvStr = UrRet ? UrRet : (PiRet ? PiRet : nullptr);
8661+
86048662
if (EnvStr)
86058663
return (std::stoi(EnvStr) != 0);
86068664
// The default is to migrate normally, which may not always be the

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

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ ur_result_t urDeviceGetInfo(
10281028
return UR_RESULT_SUCCESS;
10291029
}
10301030

1031-
// SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE can be set to an integer value, or
1031+
// UR_L0_USE_COPY_ENGINE can be set to an integer value, or
10321032
// a pair of integer values of the form "lower_index:upper_index".
10331033
// Here, the indices point to copy engines in a list of all available copy
10341034
// engines.
@@ -1038,7 +1038,10 @@ ur_result_t urDeviceGetInfo(
10381038
// available copy engines can be used.
10391039
const std::pair<int, int>
10401040
getRangeOfAllowedCopyEngines(const ur_device_handle_t &Device) {
1041-
static const char *EnvVar = std::getenv("SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE");
1041+
const char *UrRet = std::getenv("UR_L0_USE_COPY_ENGINE");
1042+
const char *PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE");
1043+
static const char *EnvVar = UrRet ? UrRet : (PiRet ? PiRet : nullptr);
1044+
10421045
// If the environment variable is not set, no copy engines are used when
10431046
// immediate commandlists are being used. For standard commandlists all are
10441047
// used.
@@ -1061,7 +1064,7 @@ getRangeOfAllowedCopyEngines(const ur_device_handle_t &Device) {
10611064
int UpperCopyEngineIndex = std::stoi(CopyEngineRange.substr(pos + 1));
10621065
if ((LowerCopyEngineIndex > UpperCopyEngineIndex) ||
10631066
(LowerCopyEngineIndex < -1) || (UpperCopyEngineIndex < -1)) {
1064-
urPrint("SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE: invalid value provided, "
1067+
urPrint("UR_L0_LEVEL_ZERO_USE_COPY_ENGINE: invalid value provided, "
10651068
"default set.\n");
10661069
LowerCopyEngineIndex = 0;
10671070
UpperCopyEngineIndex = INT_MAX;
@@ -1085,8 +1088,10 @@ _ur_device_handle_t::useImmediateCommandLists() {
10851088
// If immediate commandlist setting is not explicitly set, then use the device
10861089
// default.
10871090
static const int ImmediateCommandlistsSetting = [] {
1091+
char *UrRet = std::getenv("UR_L0_USE_IMMEDIATE_COMMANDLISTS");
1092+
char *PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS");
10881093
const char *ImmediateCommandlistsSettingStr =
1089-
std::getenv("SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS");
1094+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
10901095
if (!ImmediateCommandlistsSettingStr)
10911096
return -1;
10921097
return std::stoi(ImmediateCommandlistsSettingStr);
@@ -1114,8 +1119,10 @@ _ur_device_handle_t::useImmediateCommandLists() {
11141119

11151120
// Get value of device scope events env var setting or default setting
11161121
static const EventsScope DeviceEventsSetting = [] {
1122+
char *UrRet = std::getenv("UR_L0_DEVICE_SCOPE_EVENTS");
1123+
char *PiRet = std::getenv("SYCL_PI_LEVEL_ZERO_DEVICE_SCOPE_EVENTS");
11171124
const char *DeviceEventsSettingStr =
1118-
std::getenv("SYCL_PI_LEVEL_ZERO_DEVICE_SCOPE_EVENTS");
1125+
UrRet ? UrRet : (PiRet ? PiRet : nullptr);
11191126
if (DeviceEventsSettingStr) {
11201127
// Override the default if user has explicitly chosen the events scope.
11211128
switch (std::stoi(DeviceEventsSettingStr)) {
@@ -1532,7 +1539,7 @@ ur_result_t urDevicePartition(
15321539

15331540
// Sub-Sub-Devices are partitioned by CSlices, not by affinity domain.
15341541
// However, if
1535-
// SYCL_PI_LEVEL_ZERO_EXPOSE_CSLICE_IN_AFFINITY_PARTITIONING overrides that
1542+
// UR_L0_EXPOSE_CSLICE_IN_AFFINITY_PARTITIONING overrides that
15361543
// still expose CSlices in partitioning by affinity domain for compatibility
15371544
// reasons.
15381545
if (Properties[0] == UR_DEVICE_PARTITION_BY_AFFINITY_DOMAIN &&

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ struct _ur_device_handle_t : _ur_object {
175175
ImmCmdlistMode ImmCommandListUsed{};
176176

177177
// Scope of events used for events on the device
178-
// Can be adjusted with SYCL_PI_LEVEL_ZERO_DEVICE_SCOPE_EVENTS
178+
// Can be adjusted with UR_DEVICE_SCOPE_EVENTS
179179
// for non-immediate command lists
180180
EventsScope ZeEventsScope = AllHostVisible;
181181

0 commit comments

Comments
 (0)