Skip to content

Commit 48c5e44

Browse files
committed
[SYCL][PI][L0] Rename environment variables from LEVEL0 to LEVEL_ZERO.
1 parent 25ce7a7 commit 48c5e44

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

sycl/doc/EnvironmentVariables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ subject to change. Do not rely on these variables in production code.
2626
| SYCL_DEVICE_ALLOWLIST | A list of devices and their driver version following the pattern: DeviceName:{{XXX}},DriverVersion:{{X.Y.Z.W}}. Also may contain PlatformName and PlatformVersion | Filter out devices that do not match the pattern specified. Regular expression can be passed and the DPC++ runtime will select only those devices which satisfy the regex. Special characters, such as parenthesis, must be escaped. More than one device can be specified using the piping symbol "\|".|
2727
| SYCL_QUEUE_THREAD_POOL_SIZE | Positive integer | Number of threads in thread pool of queue. |
2828
| SYCL_DEVICELIB_NO_FALLBACK | Any(\*) | Disable loading and linking of device library images |
29-
| SYCL_PI_LEVEL0_MAX_COMMAND_LIST_CACHE | Positive integer | Maximum number of oneAPI Level Zero Command lists that can be allocated with no reuse before throwing an "out of resources" error. Default is 20000, threshold may be increased based on resource availabilty and workload demand. |
30-
| SYCL_PI_LEVEL0_DISABLE_USM_ALLOCATOR | Any(\*) | Disable USM allocator in Level Zero plugin (each memory request will go directly to Level Zero runtime) |
29+
| SYCL_PI_LEVEL_ZERO_MAX_COMMAND_LIST_CACHE | Positive integer | Maximum number of oneAPI Level Zero Command lists that can be allocated with no reuse before throwing an "out of resources" error. Default is 20000, threshold may be increased based on resource availabilty and workload demand. |
30+
| SYCL_PI_LEVEL_ZERO_DISABLE_USM_ALLOCATOR | Any(\*) | Disable USM allocator in Level Zero plugin (each memory request will go directly to Level Zero runtime) |
3131

3232
`(*) Note: Any means this environment variable is effective when set to any non-null value.`
3333

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -682,13 +682,13 @@ static pi_result getOrCreatePlatform(ze_driver_handle_t ZeDriver,
682682
// it only has to be executed once
683683
static pi_uint32 CommandListCacheSizeValue = ([] {
684684
const char *CommandListCacheSize =
685-
std::getenv("SYCL_PI_LEVEL0_MAX_COMMAND_LIST_CACHE");
685+
std::getenv("SYCL_PI_LEVEL_ZERO_MAX_COMMAND_LIST_CACHE");
686686
pi_uint32 CommandListCacheSizeValue;
687687
try {
688688
CommandListCacheSizeValue =
689689
CommandListCacheSize ? std::stoi(CommandListCacheSize) : 20000;
690690
} catch (std::exception const &) {
691-
zePrint("SYCL_PI_LEVEL0_MAX_COMMAND_LIST_CACHE: invalid value provided, "
691+
zePrint("SYCL_PI_LEVEL_ZERO_MAX_COMMAND_LIST_CACHE: invalid value provided, "
692692
"default set.\n");
693693
CommandListCacheSizeValue = 20000;
694694
}
@@ -4345,7 +4345,7 @@ pi_result piextUSMHostAlloc(void **ResultPtr, pi_context Context,
43454345

43464346
static bool ShouldUseUSMAllocator() {
43474347
// Enable allocator by default if it's not explicitly disabled
4348-
return std::getenv("SYCL_PI_LEVEL0_DISABLE_USM_ALLOCATOR") == nullptr;
4348+
return std::getenv("SYCL_PI_LEVEL_ZERO_DISABLE_USM_ALLOCATOR") == nullptr;
43494349
}
43504350

43514351
static const bool UseUSMAllocator = ShouldUseUSMAllocator();

sycl/plugins/level_zero/pi_level_zero.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ struct _pi_platform {
8484

8585
// Maximum Number of Command Lists that can be created.
8686
// This Value is initialized to 20000, but can be changed by the user
87-
// thru the environment variable SYCL_PI_LEVEL0_MAX_COMMAND_LIST_CACHE
88-
// ie SYCL_PI_LEVEL0_MAX_COMMAND_LIST_CACHE =10000.
87+
// thru the environment variable SYCL_PI_LEVEL_ZERO_MAX_COMMAND_LIST_CACHE
88+
// ie SYCL_PI_LEVEL_ZERO_MAX_COMMAND_LIST_CACHE =10000.
8989
int ZeMaxCommandListCache = 0;
9090

9191
// Current number of L0 Command Lists created on this platform.

0 commit comments

Comments
 (0)