diff --git a/sycl/doc/EnvironmentVariables.md b/sycl/doc/EnvironmentVariables.md index dd668d30352b6..98480cb3f3dec 100644 --- a/sycl/doc/EnvironmentVariables.md +++ b/sycl/doc/EnvironmentVariables.md @@ -26,8 +26,8 @@ subject to change. Do not rely on these variables in production code. | 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 "\|".| | SYCL_QUEUE_THREAD_POOL_SIZE | Positive integer | Number of threads in thread pool of queue. | | SYCL_DEVICELIB_NO_FALLBACK | Any(\*) | Disable loading and linking of device library images | -| 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. | -| SYCL_PI_LEVEL0_DISABLE_USM_ALLOCATOR | Any(\*) | Disable USM allocator in Level Zero plugin (each memory request will go directly to Level Zero runtime) | +| 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. | +| 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) | | SYCL_PI_LEVEL_ZERO_BATCH_SIZE | Positive integer | Sets a preferred number of commands to batch into a command list before executing the command list. Values 0 and 1 turn off batching. Default is 4. | `(*) Note: Any means this environment variable is effective when set to any non-null value.` diff --git a/sycl/plugins/level_zero/pi_level_zero.cpp b/sycl/plugins/level_zero/pi_level_zero.cpp index 47ca5a2f1ccbe..62aff3182bc07 100644 --- a/sycl/plugins/level_zero/pi_level_zero.cpp +++ b/sycl/plugins/level_zero/pi_level_zero.cpp @@ -765,14 +765,15 @@ static pi_result getOrCreatePlatform(ze_driver_handle_t ZeDriver, // it only has to be executed once static pi_uint32 CommandListCacheSizeValue = ([] { const char *CommandListCacheSize = - std::getenv("SYCL_PI_LEVEL0_MAX_COMMAND_LIST_CACHE"); + std::getenv("SYCL_PI_LEVEL_ZERO_MAX_COMMAND_LIST_CACHE"); pi_uint32 CommandListCacheSizeValue; try { CommandListCacheSizeValue = CommandListCacheSize ? std::stoi(CommandListCacheSize) : 20000; } catch (std::exception const &) { - zePrint("SYCL_PI_LEVEL0_MAX_COMMAND_LIST_CACHE: invalid value provided, " - "default set.\n"); + zePrint( + "SYCL_PI_LEVEL_ZERO_MAX_COMMAND_LIST_CACHE: invalid value provided, " + "default set.\n"); CommandListCacheSizeValue = 20000; } return CommandListCacheSizeValue; @@ -4452,7 +4453,7 @@ pi_result piextUSMHostAlloc(void **ResultPtr, pi_context Context, static bool ShouldUseUSMAllocator() { // Enable allocator by default if it's not explicitly disabled - return std::getenv("SYCL_PI_LEVEL0_DISABLE_USM_ALLOCATOR") == nullptr; + return std::getenv("SYCL_PI_LEVEL_ZERO_DISABLE_USM_ALLOCATOR") == nullptr; } static const bool UseUSMAllocator = ShouldUseUSMAllocator(); diff --git a/sycl/plugins/level_zero/pi_level_zero.hpp b/sycl/plugins/level_zero/pi_level_zero.hpp index 53036b4570df3..43c97b7443738 100644 --- a/sycl/plugins/level_zero/pi_level_zero.hpp +++ b/sycl/plugins/level_zero/pi_level_zero.hpp @@ -84,8 +84,8 @@ struct _pi_platform { // Maximum Number of Command Lists that can be created. // This Value is initialized to 20000, but can be changed by the user - // thru the environment variable SYCL_PI_LEVEL0_MAX_COMMAND_LIST_CACHE - // ie SYCL_PI_LEVEL0_MAX_COMMAND_LIST_CACHE =10000. + // thru the environment variable SYCL_PI_LEVEL_ZERO_MAX_COMMAND_LIST_CACHE + // ie SYCL_PI_LEVEL_ZERO_MAX_COMMAND_LIST_CACHE =10000. int ZeMaxCommandListCache = 0; // Current number of L0 Command Lists created on this platform.