Skip to content

Commit ff254ca

Browse files
[SYCL][L0] Disable round-robin submissions to multiple CCSs (#5945)
Signed-off-by: Sergey V Maslov <[email protected]>
1 parent 6821e66 commit ff254ca

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

sycl/doc/EnvironmentVariables.md

100644100755
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ variables in production code.</span>
147147
| `SYCL_PI_LEVEL_ZERO_COPY_BATCH_SIZE` | Integer | Sets a preferred number of copy commands to batch into a command list before executing the command list. A value of 0 causes the batch size to be adjusted dynamically. A value greater than 0 specifies fixed size batching, with the batch size set to the specified value. The default is 0. |
148148
| `SYCL_PI_LEVEL_ZERO_FILTER_EVENT_WAIT_LIST` | Integer | When set to 0, disables filtering of signaled events from wait lists when using the Level Zero backend. The default is 1. |
149149
| `SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE` | Any(\*) | This environment variable enables users to control use of copy engines for copy operations. If the value is an integer, it will allow the use of copy engines, if available in the device, in Level Zero plugin to transfer SYCL buffer or image data between the host and/or device(s) and to fill SYCL buffer or image data in device or shared memory. The value of this environment variable can also be a pair of the form "lower_index:upper_index" where the indices point to copy engines in a list of all available copy engines. The default is 1. |
150+
| `SYCL_PI_LEVEL_ZERO_USE_COMPUTE_ENGINE` | Integer | It can be set to an integer (>=0) in which case all compute commands will be submitted to the command-queue with the given index in the compute command group. If it is instead set to a negative value then all available compute engines may be used. The default value is "0" |
150151
| `SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE_FOR_D2D_COPY` (experimental) | Integer | Allows the use of copy engine, if available in the device, in Level Zero plugin for device to device copy operations. The default is 0. This option is experimental and will be removed once heuristics are added to make a decision about use of copy engine for device to device copy operations. |
151152
| `SYCL_PI_LEVEL_ZERO_DEVICE_SCOPE_EVENTS` | Any(\*) | Enable support of device-scope events whose state is not visible to the host. If enabled mode is SYCL_PI_LEVEL_ZERO_DEVICE_SCOPE_EVENTS=1 the Level Zero plugin would create all events having device-scope only and create proxy host-visible events for them when their status is needed (wait/query) on the host. If enabled mode is SYCL_PI_LEVEL_ZERO_DEVICE_SCOPE_EVENTS=2 the Level Zero plugin would create all events having device-scope and add proxy host-visible event at the end of each command-list submission. The default is 0, meaning all events are host-visible. |
152153

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,14 +348,16 @@ class ReturnHelper {
348348
// SYCL_PI_LEVEL_ZERO_USE_COMPUTE_ENGINE can be set to an integer (>=0) in
349349
// which case all compute commands will be submitted to the command-queue
350350
// with the given index in the compute command group. If it is instead set
351-
// to negative (or unset) then all available compute engines may be used.
351+
// to negative then all available compute engines may be used.
352+
//
353+
// The default value is "0".
352354
//
353355
static const std::pair<int, int> getRangeOfAllowedComputeEngines = [] {
354356
const char *EnvVar = std::getenv("SYCL_PI_LEVEL_ZERO_USE_COMPUTE_ENGINE");
355-
// If the environment variable is not set, all available compute engines
356-
// can be used.
357+
// If the environment variable is not set only use "0" CCS for now.
358+
// TODO: allow all CCSs when HW support is complete.
357359
if (!EnvVar)
358-
return std::pair<int, int>(0, INT_MAX);
360+
return std::pair<int, int>(0, 0);
359361

360362
auto EnvVarValue = std::atoi(EnvVar);
361363
if (EnvVarValue >= 0) {

0 commit comments

Comments
 (0)