|
| 1 | +DALI Environment Variables |
| 2 | +========================== |
| 3 | + |
| 4 | +This page lists environment variables used by DALI. |
| 5 | +Note that those variables often control internal behavior of DALI and are subject to change |
| 6 | +without notice. |
| 7 | + |
| 8 | +Memory management |
| 9 | +~~~~~~~~~~~~~~~~~ |
| 10 | + |
| 11 | +`DALI_USE_DEVICE_MEM_POOL` |
| 12 | +-------------------------- |
| 13 | + |
| 14 | +Values: 0, 1 |
| 15 | + |
| 16 | +Default: 1 |
| 17 | + |
| 18 | +If nonzero, DALI uses a memory pool for device memory; otherwise plain ``cudaMalloc`` is used. |
| 19 | + |
| 20 | +.. warning:: |
| 21 | + Specify 0 for debugging only, doing so will drastically degrade performace. |
| 22 | + |
| 23 | +`DALI_USE_VMM` |
| 24 | +-------------- |
| 25 | + |
| 26 | +Values: 0, 1 |
| 27 | + |
| 28 | +Default: 1 |
| 29 | + |
| 30 | +If nonzero, DALI uses a memory pool based on virtual memory management functions |
| 31 | +(``cuMemCreate``, ``cuMemMap``, etc) when possible. If disabled, DALI will use a pool based on |
| 32 | +`cudaMalloc`. |
| 33 | + |
| 34 | +`DALI_USE_PINNED_MEM_POOL` |
| 35 | +-------------------------- |
| 36 | + |
| 37 | +Values: 0, 1 |
| 38 | + |
| 39 | +Default: 1 |
| 40 | + |
| 41 | +If nonzero, DALI uses a memory pool for device-accessible host memory; otherwise plain |
| 42 | +``cudaMallocHost`` is used. |
| 43 | + |
| 44 | +.. warning:: |
| 45 | + Specify 0 for debugging only, doing so will drastically degrade performace. |
| 46 | + |
| 47 | +`DALI_USE_CUDA_MALLOC_ASYNC` |
| 48 | +---------------------------- |
| 49 | + |
| 50 | +Values: 0, 1 |
| 51 | + |
| 52 | +Default: 0 |
| 53 | + |
| 54 | +If enabled, DALI will use ``cudaMallocAsync`` as the device memory allocation mechanism. |
| 55 | +This flag is not compatible with ``DALI_USE_DEVICE_MEM_POOL=0`` and explicitly enabling |
| 56 | +``DALI_USE_VMM=1``. |
| 57 | + |
| 58 | +`DALI_MALLOC_POOL_THRESHOLD` |
| 59 | +---------------------------- |
| 60 | + |
| 61 | +Values: >= 0, optionally followed by k for KiB or M for MiB. |
| 62 | + |
| 63 | +Default: 0 |
| 64 | + |
| 65 | +If nonzero, dali uses an internal memory pool for regular host memory below the specified size. |
| 66 | + |
| 67 | +`DALI_GDS_CHUNK_SIZE` |
| 68 | +--------------------- |
| 69 | + |
| 70 | +Values: powers of 2, 4k to 16M, with optional k or M suffix |
| 71 | + |
| 72 | +Default: 2M |
| 73 | + |
| 74 | +The size of memory chunk used by GPU Direct Storage in DALI. |
| 75 | + |
| 76 | +`DALI_HOST_BUFFER_SHRINK_THRESHOLD` |
| 77 | +----------------------------------- |
| 78 | + |
| 79 | +Values: floating point, 0..1 |
| 80 | + |
| 81 | +Default: 0.5 |
| 82 | + |
| 83 | +If set, buffers resized to below the given fraction of capacity will be shrunk to fit the data. |
| 84 | + |
| 85 | +`DALI_BUFFER_GROWTH_FACTOR` |
| 86 | +--------------------------- |
| 87 | + |
| 88 | +Values: floating point, >=1 |
| 89 | + |
| 90 | +Default: 1.1 |
| 91 | + |
| 92 | +When greather than 1, buffers are allocated with allowance to avoid frequent reallocation. |
| 93 | + |
| 94 | +`DALI_HOST_BUFFER_GROWTH_FACTOR` |
| 95 | +-------------------------------- |
| 96 | + |
| 97 | +Specialized version of `DALI_BUFFER_GROWTH_FACTOR` for CPU buffers only. |
| 98 | + |
| 99 | +`DALI_DEVICE_BUFFER_GROWTH_FACTOR` |
| 100 | +---------------------------------- |
| 101 | + |
| 102 | +Specialized version of `DALI_BUFFER_GROWTH_FACTOR` for GPU buffers only. |
| 103 | + |
| 104 | +`DALI_RESTRICT_PINNED_MEM` |
| 105 | +-------------------------- |
| 106 | + |
| 107 | +Values: 0, 1 |
| 108 | + |
| 109 | +Default: 0 |
| 110 | + |
| 111 | +If enabled, DALI will reduce the use of pinned host memory; useful on systems where the amount |
| 112 | +of pinned memory is restricted (e.g. WSL). |
| 113 | + |
| 114 | +Image decoding |
| 115 | +~~~~~~~~~~~~~~ |
| 116 | + |
| 117 | +`DALI_MAX_JPEG_SCANS` |
| 118 | +--------------------- |
| 119 | + |
| 120 | +Values: >= 1 |
| 121 | + |
| 122 | +Default: 256 |
| 123 | + |
| 124 | +The maximum number of progressive JPEG scans. Specify lower values to mitigate maliciously malformed |
| 125 | +JPEGs, designed for denial of service attacks. |
| 126 | + |
| 127 | +`DALI_NVIMGCODEC_LOG_LEVEL` |
| 128 | +--------------------------- |
| 129 | + |
| 130 | +Values: 1..5 |
| 131 | + |
| 132 | +Default: 2 |
| 133 | + |
| 134 | +The verbosity of logs produced by nvJPEG |
| 135 | + |
| 136 | +Miscellaneous |
| 137 | +~~~~~~~~~~~~~ |
| 138 | + |
| 139 | +`DALI_OPTIMIZE_GRAPH` |
| 140 | +--------------------- |
| 141 | + |
| 142 | +Values: 0, 1 |
| 143 | + |
| 144 | +Default: 1 |
| 145 | + |
| 146 | +For debugging only; if set to 0, all DALI graph optimizations are disabled. |
| 147 | + |
| 148 | +`DALI_ENABLE_CSE` |
| 149 | +----------------- |
| 150 | + |
| 151 | +Values: 0, 1 |
| 152 | + |
| 153 | +Default: 1 |
| 154 | + |
| 155 | +For debugging only; if set to 0, the common subexpression elimination (CSE) graph optimization |
| 156 | +is disabled. If `DALI_OPTIMIZE_GRAPH` is disabled, this flag has no effect. |
| 157 | + |
| 158 | + |
| 159 | +`DALI_USE_EXEC2` |
| 160 | +---------------- |
| 161 | + |
| 162 | +Values: 0, 1 |
| 163 | + |
| 164 | +Default: 0 |
| 165 | + |
| 166 | +If set, DALI will use the dynamic executor (as if ``exec_dynamic=True`` was set in the Pipeline) |
| 167 | +whenever the default asychronous pipelined execution with uniform queue size is specified. |
| 168 | +Enabling the dynamic executor can potentially improve memory consumption. |
| 169 | + |
| 170 | +.. note:: |
| 171 | + This flag is used in the backend only; the Python frontend is unaware of it and doesn't enable |
| 172 | + the new features and optimizations that would be enabled by specifying ``exec_dynamic=True`` |
| 173 | + in the pipeline. |
| 174 | + |
| 175 | +`DALI_AFFINITY_MASK` |
| 176 | +-------------------- |
| 177 | + |
| 178 | +Values: comma-separated list of CPU IDs |
| 179 | + |
| 180 | +Default: empty |
| 181 | + |
| 182 | +Sets the thread affinity. The number of entries in the list must match the ``num_threads`` passed |
| 183 | +to the pipeline. |
| 184 | +Requires NVML. |
| 185 | + |
| 186 | + |
| 187 | +`DALI_PRELOAD_PLUGINS` |
| 188 | +---------------------- |
| 189 | + |
| 190 | +Values: colon-separated list of paths |
| 191 | + |
| 192 | +Default: empty |
| 193 | + |
| 194 | +If specified, DALI will preload plugins specified in this list. |
| 195 | + |
| 196 | +`DALI_DISABLE_NVML` |
| 197 | +------------------- |
| 198 | + |
| 199 | +Values: 0, 1 |
| 200 | + |
| 201 | +Default: 0 |
| 202 | + |
| 203 | +If set, DALI doesn't try to use NVML. Useful on systems without NVML support, e.g. WSL2. |
| 204 | + |
| 205 | +Testing |
| 206 | +~~~~~~~ |
| 207 | + |
| 208 | +`DALI_EXTRA_PATH` |
| 209 | +----------------- |
| 210 | + |
| 211 | +Values: path |
| 212 | + |
| 213 | +Default: empty |
| 214 | + |
| 215 | +The path to where the contents of `DALI_extra <https://github.com/NVIDIA/DALI_extra>`_ repository |
| 216 | +reside. Necessary to run DALI tests. |
0 commit comments