A GPU-accelerated library containing highly optimized building blocks and an execution engine for data processing to accelerate deep learning training and inference applications.
The NVIDIA Data Loading Library (DALI) is a library for data loading and pre-processing to accelerate deep learning applications. It provides a collection of highly optimized building blocks for loading and processing image, video and audio data. It can be used as a portable drop-in replacement for built in data loaders and data iterators in popular deep learning frameworks.
Deep learning applications require complex, multi-stage data processing pipelines that include loading, decoding, cropping, resizing, and many other augmentations. These data processing pipelines, which are currently executed on the CPU, have become a bottleneck, limiting the performance and scalability of training and inference.
DALI addresses the problem of the CPU bottleneck by offloading data preprocessing to the GPU. Additionally, DALI relies on its own execution engine, built to maximize the throughput of the input pipeline. Features such as prefetching, parallel execution, and batch processing are handled transparently for the user.
In addition, the deep learning frameworks have multiple data pre-processing implementations, resulting in challenges such as portability of training and inference workflows, and code maintainability. Data processing pipelines implemented using DALI are portable because they can easily be retargeted to TensorFlow, PyTorch, MXNet and PaddlePaddle.
.. image:: /dali.png :width: 800 :align: center :alt: DALI Diagram
.. |gds| replace:: GPUDirect Storage .. _gds: https://developer.nvidia.com/gpudirect-storage
.. |triton| replace:: NVIDIA Triton Inference Server .. _triton: https://developer.nvidia.com/nvidia-triton-inference-server
.. |triton-dali-backend| replace:: DALI TRITON Backend .. _triton-dali-backend: https://github.com/triton-inference-server/dali_backend
|dali-roadmap-link|_ a high-level overview of our 2021 plan. You should be aware that this roadmap may change at any time and the order below does not reflect any type of priority.
We strongly encourage you to comment on our roadmap and provide us feedback on the mentioned GitHub issue.
.. |dali-roadmap-link| replace:: The following issue represents .. _dali-roadmap-link: https://github.com/NVIDIA/DALI/issues/2978
To install the latest DALI release for the latest CUDA version (11.x)::
pip install --extra-index-url https://developer.download.nvidia.com/compute/redist --upgrade nvidia-dali-cuda110
DALI comes preinstalled in the TensorFlow, PyTorch, and MXNet containers on
NVIDIA GPU Cloud <https://ngc.nvidia.com>_
(versions 18.07 and later).
For other installation paths (TensorFlow plugin, older CUDA version, nightly and weekly builds, etc), please refer to the |docs_install|_.
To build DALI from source, please refer to the |dali_compile|_.
.. |docs_install| replace:: Installation Guide .. _docs_install: https://docs.nvidia.com/deeplearning/dali/user-guide/docs/installation.html .. |dali_compile| replace:: Compilation Guide .. _dali_compile: https://docs.nvidia.com/deeplearning/dali/user-guide/docs/compilation.html
An introduction to DALI can be found in the |dali_start|_ page.
More advanced examples can be found in the |dali_examples|_ page.
For an interactive version (Jupyter notebook) of the examples, go to the
Note: Select the |release-doc|_ or the |nightly-doc|_, which stays in sync with the main branch, depending on your version.
.. |dali_start| replace:: Getting Started .. _dali_start: https://docs.nvidia.com/deeplearning/dali/user-guide/docs/examples/getting%20started.html .. |dali_examples| replace:: Examples and Tutorials .. _dali_examples: https://docs.nvidia.com/deeplearning/dali/user-guide/docs/examples/index.html .. |release-doc| replace:: Latest Release Documentation .. _release-doc: https://docs.nvidia.com/deeplearning/dali/user-guide/docs/index.html .. |nightly-doc| replace:: Nightly Release Documentation .. _nightly-doc: https://docs.nvidia.com/deeplearning/dali/main-user-guide/docs/index.html
Developer Page <https://developer.nvidia.com/DALI>_.
Blog Posts <https://developer.nvidia.com/blog/tag/dali/>_.
.. |slides1| replace:: slides .. _slides1: http://on-demand.gputechconf.com/gtc/2018/presentation/s8906-fast-data-pipelines-for-deep-learning-training.pdf .. |recording1| replace:: recording .. _recording1: https://www.nvidia.com/en-us/on-demand/session/gtcsiliconvalley2018-s8906/ .. |slides2| replace:: slides .. _slides2: https://developer.download.nvidia.com/video/gputechconf/gtc/2019/presentation/s9925-fast-ai-data-pre-processing-with-nvidia-dali.pdf .. |recording2| replace:: recording .. _recording2: https://developer.nvidia.com/gtc/2019/video/S9925/video .. |slides3| replace:: slides .. _slides3: https://developer.download.nvidia.com/video/gputechconf/gtc/2019/presentation/s9818-integration-of-tensorrt-with-dali-on-xavier.pdf .. |recording3| replace:: recording .. _recording3: https://developer.nvidia.com/gtc/2019/video/S9818/video .. |recording4| replace:: recording .. _recording4: https://developer.nvidia.com/gtc/2020/video/s21139 .. |event2021| replace:: event .. _event2021: https://gtc21.event.nvidia.com/media/1_j4dk7w7q
We welcome contributions to DALI. To contribute to DALI and make pull requests,
follow the guidelines outlined in the
If you are looking for a task good for the start please check one from
external contribution welcome label <https://github.com/NVIDIA/DALI/labels/external%20contribution%20welcome>_.
We appreciate feedback, questions or bug reports. When you need help
with the code, follow the process outlined in the Stack Overflow
<https://stackoverflow.com/help/mcve>_ document. Ensure that the
posted examples are:
DALI was originally built with major contributions from Trevor Gale, Przemek Tredak, Simon Layton, Andrei Ivanov and Serge Panev.
.. |License| image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg :target: https://opensource.org/licenses/Apache-2.0