Skip to content
Back to search

DALI

A GPU-accelerated library containing highly optimized building blocks and an execution engine for data processing to accelerate deep learning training and inference applications.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/NVIDIA/DALI with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/NVIDIA/DALI'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/nvidia--dali/badge.svg)](/listings/nvidia--dali)

HTML

<a href="/listings/nvidia--dali"><img src="/api/listings/nvidia--dali/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

To install the latest DALI release for the latest CUDA version (12.x)::

pip install nvidia-dali-cuda120 # or pip install --extra-index-url https://pypi.nvidia.com --upgrade nvidia-dali-cuda120

DALI requires `NVIDIA driver <https://www.nvidia.com/drivers>`__ supporting the appropriate CUDA version. In case of DALI based on CUDA 12, it requires `CUDA Toolkit <https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html>`__ to be installed.

DALI comes preinstalled in the `TensorFlow <https://catalog.ngc.nvidia.com/orgs/nvidia/containers/tensorflow>`__, `PyTorch <https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch>`__, and `PaddlePaddle <https://catalog.ngc.nvidia.com/orgs/nvidia/containers/paddlepaddle>`__ containers on `NVIDIA GPU Cloud <https://ngc.nvidia.com>`__.

For other installation paths (TensorFlow plugin, older CUDA version, nightly and weekly builds, etc), and specific requirements please refer to the `Installation Guide <https://docs.nvidia.com/deeplearning/dali/user-guide/docs/installation.html>`__.

To build DALI from source, please refer to the `Compilation Guide <https://docs.nvidia.com/deeplearning/dali/user-guide/docs/compilation.html>`__.

----

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.rst · README · 333 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. |License| |Documentation| |Format|
  2. NVIDIA DALI
  3. ===========
  4. .. overview-begin-marker-do-not-remove
  5. The NVIDIA Data Loading Library (DALI) is a GPU-accelerated library for data loading
  6. and pre-processing to accelerate deep learning applications. It provides a
  7. collection of highly optimized building blocks for loading and processing
  8. image, video and audio data. It can be used as a portable drop-in replacement
  9. for built in data loaders and data iterators in popular deep learning frameworks.
  10. Deep learning applications require complex, multi-stage data processing pipelines
  11. that include loading, decoding, cropping, resizing, and many other augmentations.
  12. These data processing pipelines, which are currently executed on the CPU, have become a
  13. bottleneck, limiting the performance and scalability of training and inference.
  14. DALI addresses the problem of the CPU bottleneck by offloading data preprocessing to the
  15. GPU. Additionally, DALI relies on its own execution engine, built to maximize the throughput
  16. of the input pipeline. Features such as prefetching, parallel execution, and batch processing
  17. are handled transparently for the user.
  18. In addition, the deep learning frameworks have multiple data pre-processing implementations,
  19. resulting in challenges such as portability of training and inference workflows, and code
  20. maintainability. Data processing pipelines implemented using DALI are portable because they
  21. can easily be retargeted to TensorFlow, PyTorch, and PaddlePaddle.
  22. .. image:: /dali.png
  23. :width: 800
  24. :align: center
  25. :alt: DALI Diagram
  26. .. github display off
  27. .. GitHub discards custom styles when rendering Markdown. We can use it to our advantage to hide the GitHub-style
  28. admonition in the sphinx-rendered documentation
  29. .. only:: html
  30. .. raw:: html
  31. <style>
  32. .github-only {
  33. display: none !important;
  34. }
  35. </style>
  36. .. rst-class:: github-only
  37. .. pull-quote::
  38. [!TIP]
  39. The `dali-dynamic-mode <https://github.com/NVIDIA/skills/blob/main/skills/dali-dynamic-mode/SKILL.md>`_ skill
  40. provides AI agents with guidance on the Dynamic Mode API and best practices. It can be installed as follows:
  41. .. code-block:: sh
  42. npx skills add nvidia/skills --skill dali-dynamic-mode
  43. For more information, see the `NVIDIA/skills <https://github.com/NVIDIA/skills>`_ GitHub repository.
  44. DALI in action
  45. --------------
  46. .. container:: dali-tabs
  47. **Pipeline mode:**
  48. .. code-block:: python
  49. from nvidia.dali.pipeline import pipeline_def
  50. import nvidia.dali.types as types
  51. import nvidia.dali.fn as fn
  52. from nvidia.dali.plugin.pytorch import DALIGenericIterator
  53. import os
  54. # To run with different data, see documentation of nvidia.dali.fn.readers.file
  55. # points to https://github.com/NVIDIA/DALI_extra
  56. data_root_dir = os.environ['DALI_EXTRA_PATH']
  57. images_dir = os.path.join(data_root_dir, 'db', 'single', 'jpeg')
  58. def loss_func(pred, y):
  59. pass
  60. def model(x):
  61. pass
  62. def backward(loss, model):
  63. pass
  64. @pipeline_def(num_threads=4, device_id=0)
  65. def get_dali_pipeline():
  66. images, labels = fn.readers.file(
  67. file_root=images_dir, random_shuffle=True, name="Reader")
  68. # decode data on the GPU
  69. images = fn.decoders.image_random_crop(
  70. images, device="mixed", output_type=types.RGB)
  71. # the rest of processing happens on the GPU as well
  72. images = fn.resize(images, resize_x=256, resize_y=256)
  73. images = fn.crop_mirror_normalize(
  74. images,
  75. crop_h=224,
  76. crop_w=224,
  77. mean=[0.485 * 255, 0.456 * 255, 0.406 * 255],
  78. std=[0.229 * 255, 0.224 * 255, 0.225 * 255],
  79. mirror=fn.random.coin_flip())
  80. return images, labels
  81. train_data = DALIGenericIterator(
  82. [get_dali_pipeline(batch_size=16)],
  83. ['data', 'label'],
  84. reader_name='Reader'
  85. )
  86. for i, data in enumerate(train_data):
  87. x, y = data[0]['data'], data[0]['label']
  88. pred = model(x)
  89. loss = loss_func(pred, y)
  90. backward(loss, model)
  91. **Dynamic mode:**
  92. .. code-block:: python
  93. import os
  94. import nvidia.dali.types as types
  95. import nvidia.dali.experimental.dynamic as ndd
  96. import torch
  97. # To run with different data, see documentation of ndd.readers.File
  98. # points to https://github.com/NVIDIA/DALI_extra
  99. data_root_dir = os.environ['DALI_EXTRA_PATH']
  100. images_dir = os.path.join(data_root_dir, 'db', 'single', 'jpeg')
  101. def loss_func(pred, y):
  102. pass
  103. def model(x):
  104. pass
  105. def backward(loss, model):
  106. pass
  107. reader = ndd.readers.File(file_root=images_dir, random_shuffle=True)
  108. for images, labels in reader.next_epoch(batch_size=16):
  109. images = ndd.decoders.image_random_crop(images, device="gpu", output_type=types.RGB)
  110. # the rest of processing happens on the GPU as well
  111. images = ndd.resize(images, resize_x=256, resize_y=256)
  112. images = ndd.crop_mirror_normalize(
  113. images,
  114. crop_h=224,
  115. crop_w=224,
  116. mean=[0.485 * 255, 0.456 * 255, 0.406 * 255],
  117. std=[0.229 * 255, 0.224 * 255, 0.225 * 255],
  118. mirror=ndd.random.coin_flip(),
  119. )
  120. x = torch.as_tensor(images)
  121. y = torch.as_tensor(labels.gpu())
  122. pred = model(x)
  123. loss = loss_func(pred, y)
  124. backward(loss, model)
  125. Highlights
  126. ----------
  127. - Easy-to-use functional style Python API.
  128. - Multiple data formats support - LMDB, RecordIO, TFRecord, COCO, JPEG, JPEG 2000, WAV, FLAC, OGG, H.264, VP9 and HEVC.
  129. - Portable across popular deep learning frameworks: TensorFlow, PyTorch, PaddlePaddle, JAX.
  130. - Supports CPU and GPU execution.
  131. - Scalable across multiple GPUs.
  132. - Flexible graphs let developers create custom pipelines.
  133. - Extensible for user-specific needs with custom operators.
  134. - Accelerates image classification (ResNet-50), object detection (SSD) workloads as well as ASR models (Jasper, RNN-T).
  135. - Allows direct data path between storage and GPU memory with `GPUDirect Storage <https://developer.nvidia.com/gpudirect-storage>`__.
  136. - Easy integration with `NVIDIA Triton Inference Server <https://developer.nvidia.com/nvidia-triton-inference-server>`__
  137. with `DALI TRITON Backend <https://github.com/triton-inference-server/dali_backend>`__.
  138. - Open source.
  139. .. overview-end-marker-do-not-remove
  140. ----
  141. DALI success stories:
  142. ---------------------
  143. - `During Kaggle computer vision competitions <https://www.kaggle.com/code/theoviel/rsna-breast-baseline-faster-inference-with-dali>`__:
  144. `"DALI is one of the best things I have learned in this competition" <https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/391059>`__
  145. - `Lightning Pose - state of the art pose estimation research model <https://www.ncbi.nlm.nih.gov/pmc/articles/PMC10168383/>`__
  146. - `To improve the resource utilization in Advanced Computing Infrastructure <https://arcwiki.rs.gsu.edu/en/dali/using_nvidia_dali_loader>`__
  147. - `MLPerf - the industry standard for benchmarking compute and deep learning hardware and software <https://developer.nvidia.com/blog/mlperf-hpc-v1-0-deep-dive-into-optimizations-leading-to-record-setting-nvidia-performance/>`__
  148. - `"we optimized major models inside eBay with the DALI framework" <https://www.nvidia.com/en-us/on-demand/session/gtc24-s62578/>`__
  149. ----
  150. DALI Roadmap
  151. ------------
  152. `The following issue represents <https://github.com/NVIDIA/DALI/issues/5320>`__ a high-level overview of our 2024 plan. You should be aware that this
  153. roadmap may change at any time and the order of its items does not reflect any type of priority.
  154. We strongly encourage you to comment on our roadmap and provide us feedback on the mentioned
  155. GitHub issue.
  156. ----
  157. Installing DALI
  158. ---------------
  159. To install the latest DALI release for the latest CUDA version (12.x)::
  160. pip install nvidia-dali-cuda120
  161. # or
  162. pip install --extra-index-url https://pypi.nvidia.com --upgrade nvidia-dali-cuda120
  163. DALI requires `NVIDIA driver <https://www.nvidia.com/drivers>`__ supporting the appropriate CUDA version.
  164. In case of DALI based on CUDA 12, it requires `CUDA Toolkit <https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html>`__
  165. to be installed.
  166. DALI comes preinstalled in the `TensorFlow <https://catalog.ngc.nvidia.com/orgs/nvidia/containers/tensorflow>`__,
  167. `PyTorch <https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch>`__,
  168. and `PaddlePaddle <https://catalog.ngc.nvidia.com/orgs/nvidia/containers/paddlepaddle>`__
  169. containers on `NVIDIA GPU Cloud <https://ngc.nvidia.com>`__.
  170. For other installation paths (TensorFlow plugin, older CUDA version, nightly and weekly builds, etc),
  171. and specific requirements please refer to the `Installation Guide <https://docs.nvidia.com/deeplearning/dali/user-guide/docs/installation.html>`__.
  172. To build DALI from source, please refer to the `Compilation Guide <https://docs.nvidia.com/deeplearning/dali/user-guide/docs/compilation.html>`__.
  173. ----
  174. Examples and Tutorials
  175. ----------------------
  176. An introduction to DALI can be found in the `Getting Started <https://docs.nvidia.com/deeplearning/dali/user-guide/docs/examples/getting_started.html>`__ page.
  177. More advanced examples can be found in the `Examples and Tutorials <https://docs.nvidia.com/deeplearning/dali/user-guide/docs/examples/index.html>`__ page.
  178. For an interactive version (Jupyter notebook) of the examples, go to the `docs/examples <https://github.com/NVIDIA/DALI/blob/main/docs/examples>`__
  179. directory.
  180. **Note:** Select the `Latest Release Documentation <https://docs.nvidia.com/deeplearning/dali/user-guide/docs/index.html>`__
  181. or the `Nightly Release Documentation <https://docs.nvidia.com/deeplearning/dali/main-user-guide/docs/index.html>`__, which stays in sync with the main branch,
  182. depending on your version.
  183. ----
  184. Additional Resources
  185. --------------------
  186. - GPU Technology Conference 2024; **Optimizing Inference Model Serving for Highest Performance at eBay**; Yiheng Wang:
  187. `event <https://www.nvidia.com/en-us/on-demand/session/gtc24-s62578/>`__
  188. - GPU Technology Conference 2023; **Developer Breakout: Accelerating Enterprise Workflows With Triton Server and DALI**; Brandon Tuttle:
  189. `event <https://www.nvidia.com/en-us/on-demand/session/gtcspring23-se52140/>`__.
  190. - GPU Technology Conference 2023; **GPU-Accelerating End-to-End Geospatial Workflows**; Kevin Green:
  191. `event <https://www.nvidia.com/en-us/on-demand/session/gtcspring23-s51796/>`__.
  192. - GPU Technology Conference 2022; **Effective NVIDIA DALI: Accelerating Real-life Deep-learning Applications**; Rafał Banaś:
  193. `event <https://www.nvidia.com/en-us/on-demand/session/gtcspring22-s41442/>`__.
  194. - GPU Technology Conference 2022; **Introduction to NVIDIA DALI: GPU-accelerated Data Preprocessing**; Joaquin Anton Guirao:
  195. `event <https://www.nvidia.com/en-us/on-demand/session/gtcspring22-s41443/>`__.
  196. - GPU Technology Conference 2021; **NVIDIA DALI: GPU-Powered Data Preprocessing** by Krzysztof Łęcki and Michał Szołucha:
  197. `event <https://www.nvidia.com/en-us/on-demand/session/gtcspring21-s31298/>`__.
  198. - GPU Technology Conference 2020; **Fast Data Pre-Processing with NVIDIA Data Loading Library (DALI)**; Albert Wolant, Joaquin Anton Guirao:
  199. `recording <https://developer.nvidia.com/gtc/2020/video/s21139>`__.
  200. - GPU Technology Conference 2019; **Fast AI data pre-preprocessing with DALI**; Janusz Lisiecki, Michał Zientkiewicz:
  201. `slides <https://developer.download.nvidia.com/video/gputechconf/gtc/2019/presentation/s9925-fast-ai-data-pre-processing-with-nvidia-dali.pdf>`__,
  202. `recording <https://developer.nvidia.com/gtc/2019/video/S9925/video>`__.
  203. - GPU Technology Conference 2019; **Integration of DALI with TensorRT on Xavier**; Josh Park and Anurag Dixit:
  204. `slides <https://developer.download.nvidia.com/video/gputechconf/gtc/2019/presentation/s9818-integration-of-tensorrt-with-dali-on-xavier.pdf>`__,
  205. `recording <https://developer.nvidia.com/gtc/2019/video/S9818/video>`__.
  206. - GPU Technology Conference 2018; **Fast data pipeline for deep learning training**, T. Gale, S. Layton and P. Trędak:
  207. `slides <http://on-demand.gputechconf.com/gtc/2018/presentation/s8906-fast-data-pipelines-for-deep-learning-training.pdf>`__,
  208. `recording <https://www.nvidia.com/en-us/on-demand/session/gtcsiliconvalley2018-s8906/>`__.
  209. - `Developer Page <https://developer.nvidia.com/DALI>`__.
  210. - `Blog Posts <https://developer.nvidia.com/blog/tag/dali/>`__.
  211. ----
  212. Contributing to DALI
  213. --------------------
  214. We welcome contributions to DALI. To contribute to DALI and make pull requests,
  215. follow the guidelines outlined in the `Contributing <https://github.com/NVIDIA/DALI/blob/main/CONTRIBUTING.md>`__
  216. document.
  217. If you are looking for a task good for the start please check one from
  218. `external contribution welcome label <https://github.com/NVIDIA/DALI/labels/external%20contribution%20welcome>`__.
  219. Reporting Problems, Asking Questions
  220. ------------------------------------
  221. We appreciate feedback, questions or bug reports. When you need help
  222. with the code, follow the process outlined in the `Stack Overflow
  223. <https://stackoverflow.com/help/mcve>`__ document. Ensure that the
  224. posted examples are:
  225. - **minimal**: Use as little code as possible that still produces the same problem.
  226. - **complete**: Provide all parts needed to reproduce the problem.
  227. Check if you can strip external dependency and still show the problem.
  228. The less time we spend on reproducing the problems, the more time we
  229. can dedicate to the fixes.
  230. - **verifiable**: Test the code you are about to provide, to make sure
  231. that it reproduces the problem. Remove all other problems that are not
  232. related to your request.
  233. Acknowledgements
  234. ----------------
  235. DALI was originally built with major contributions from Trevor Gale, Przemek Tredak,
  236. Simon Layton, Andrei Ivanov and Serge Panev.
  237. .. |License| image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg
  238. :target: https://opensource.org/licenses/Apache-2.0
  239. .. |Documentation| image:: https://img.shields.io/badge/NVIDIA%20DALI-documentation-brightgreen.svg?longCache=true
  240. :target: https://docs.nvidia.com/deeplearning/dali/user-guide/docs/index.html
  241. .. |Format| image:: https://img.shields.io/badge/code%20style-black-000000.svg
  242. :target: https://github.com/psf/black

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.