Skip to content

Commit e59a470

Browse files
Expanded environment variable document
1 parent f59de05 commit e59a470

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

docs/doc_sources/beginners_guides/environment_variables.rst

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ Environment variables
44
=====================
55

66
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
813
used to limit the choice of devices available to :py:mod:`dpctl`.
914

1015
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:
3742
# execute on GPU device
3843
ONEAPI_DEVICE_SELECTOR=*:gpu python run.py
3944
# 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

Comments
 (0)