@@ -4,7 +4,12 @@ Environment variables
4
4
=====================
5
5
6
6
Behavior of :py:mod: `dpctl ` is affected by :dpcpp_envar: `environment variables <> ` that
7
- affect DPC++ compiler runtime. Particularly, the varible ``ONEAPI_DEVICE_SELECTOR `` can be
7
+ affect DPC++ compiler runtime.
8
+
9
+ Variable ``ONEAPI_DEVICE_SELECTOR ``
10
+ -----------------------------------
11
+
12
+ The varible ``ONEAPI_DEVICE_SELECTOR `` can be
8
13
used to limit the choice of devices available to :py:mod: `dpctl `.
9
14
10
15
As such, the device returned by :py:func: `select_default_device `, as well the behavior
@@ -37,3 +42,21 @@ This script may be executed on a CPU, or GPU as follows:
37
42
# execute on GPU device
38
43
ONEAPI_DEVICE_SELECTOR=* :gpu python run.py
39
44
# Output: Approximate value of integral: 48329. running on Device(level_zero:gpu:0)
45
+
46
+
47
+ Variable ``SYCL_CACHE_PERSISTENT ``
48
+ ----------------------------------
49
+
50
+ The binaries implementing :py:mod: `dpctl.tensor ` created using DPC++ compiler contain sections
51
+ with standardized intermediate forms (e.g. `SPIR-V <https://www.khronos.org/spir/ >`_) that must be
52
+ further built using SYCL device drivers for execution on the specific target hardware.
53
+ This step is known as just-in-time compiling (JIT-ing).
54
+
55
+ By default, the result of JIT-ing persists for the duration of SYCL application, i.e. for the
56
+ duration of the Python session where :py:mod: `dpctl.tensor ` is used. Setting environment variable
57
+ ``SYCL_CACHE_PERSISTENT `` to value of ``1 `` instructs DPC++ runtime to save the result of JIT-ing to
58
+ disk and reuse it in subsequent Python sessions (assuming the variable remains to be set when sessions
59
+ are started).
60
+
61
+ Setting of the environment variable ``SYCL_CACHE_PERSISTENT `` improves times of function invocations,
62
+ but requires sufficient disk space.
0 commit comments