Configuration Options for numba-dpex#

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 numba_dpex/core/


In order to enable/disable each of the configuration flags, a NUMBA_DPEX prefix needs to be appended before each variable. For example, in order to turn SAVE_IR_FILES flag on, it needs to be passed as NUMBA_DPEX_SAVE_IR_FILES=1

For example:

user@host:~/NUMBA_DPEX_SAVE_IR_FILES=1 python

The list of available configuration flags are listed as follows:


A flag to save the Numba* intermediate representation (IR) files generated by the compiler. Set to 0 by default.


A flag to turn Numba*’s SPIRV-VALIDATION switch. Set to 0 by default.


A flag to dump the offload diagnostics. Set to 0 by default.


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.


A flag to emit the debug info, inherited from numba.core.config.DEBUG.


The default value for the debug flag. Inherited from numba.core.config.DEBUGINFO_DEFAULT.


A flag to emit LLVM assembly language format (.ll). Inherited from numba.core.config.DUMP_OPTIMIZED.


A flag to enable caching, set NUMBA_DPEX_ENABLE_CACHE=0 to turn off. Set to 1 by default.


A flag to specify the default cache size. Set to 20 by default.


A flag to enable debugging of cahcing mechanism, set 1 to turn it on.


A flag to turn on the ConstantSizeStaticLocalMemoryPass in the kernel pipeline. The pass is turned off by default.