Skip to content

Commit 3473dbd

Browse files
chudur-budurDiptorup Deb
authored andcommitted
Adding config section
1 parent 9b4b8aa commit 3473dbd

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

docs/source/user_guide/config.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
.. include:: ./../ext_links.txt
2+
3+
Configuration Options for ``numba-dpex``
4+
========================================
5+
6+
``numba-dpex`` provides a set of environment variables and flags for configuring different aspects of the compilation, debugging and execution of programs. The configuration flags of ``numba-dpex`` are mostly inherited from those of Numba*. They are defined in :file:`numba_dpex/core/config.py` and are listed as follows:
7+
8+
``SAVE_IR_FILES``:
9+
A flag to save the Numba* intermediate representation (IR) files generated by the compiler. Set to ``0`` by default.
10+
11+
``SPIRV_VAL``:
12+
A flag to turn Numba*'s ``SPIRV-VALIDATION`` switch. Set to ``0`` by default.
13+
14+
``OFFLOAD_DIAGNOSTICS``:
15+
A flag to dump the offload diagnostics. Set to ``0`` by default.
16+
17+
``NATIVE_FP_ATOMICS``:
18+
A flag to activate the native floating point (FP) atomcis support for supported devices. Requires ``llvm-spirv`` supporting the FP atomics extension. Set to ``0`` by default.
19+
20+
``DEBUG``:
21+
A flag to emit the debug info, inherited from `numba.core.config.DEBUG <https://github.com/numba/numba/blob/main/numba/core/config.py#L202>`__.
22+
23+
``DEBUGINFO_DEFAULT``:
24+
The default value for the `debug` flag. Inherited from `numba.core.config.DEBUGINFO_DEFAULT <https://github.com/numba/numba/blob/main/numba/core/config.py#L488>`__
25+
26+
``DUMP_KERNEL_LLVM``:
27+
A flag to emit LLVM assembly language format (``.ll``). Inherited from `numba.core.config.DUMP_OPTIMIZED <https://github.com/numba/numba/blob/main/numba/core/config.py#L301>`__
28+
29+
``ENABLE_CACHE``:
30+
A flag to enable caching, set ``NUMBA_DPEX_ENABLE_CACHE=0`` to turn off. Set to ``1`` by default.
31+
32+
``CACHE_SIZE``:
33+
A flag to specify the default cache size. Set to ``20`` by default.
34+
35+
``DEBUG_CACHE``:
36+
A flag to enable debugging of cahcing mechanism, set ``1`` to turn it on.
37+
38+
``STATIC_LOCAL_MEM_PASS``:
39+
A flag to turn on the ``ConstantSizeStaticLocalMemoryPass`` in the kernel pipeline. The pass is turned off by default.
40+
41+
.. note::
42+
In order to enable/disable each of the configuration flags, a ``NUMBA_DPEX``
43+
prefix needs to be appended before each variable. For example, in order to
44+
turn ``SAVE_IR_FILES`` flag on, it needs to be passed as ``NUMBA_DPEX_SAVE_IR_FILES=1``
45+
46+
For example:
47+
48+
.. code-block:: bash
49+
50+
user@host:~/NUMBA_DPEX_SAVE_IR_FILES=1 python numba_dpex_program.py

docs/source/user_guide/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ User Guide
1717
dpnp_offload
1818
debugging/index
1919
caching
20+
config
2021
useful_links

0 commit comments

Comments
 (0)