Deep learning applications require complex, multi-stage pre-processing data pipelines. Such data pipelines involve compute-intensive operations that are carried out on the CPU. For example, tasks such as: load data from disk, decode, crop, random resize, color and spatial augmentations and format conversions, are mainly carried out on the CPUs, limiting the performance and scalability of training and inference.
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.
NVIDIA Data Loading Library (DALI) is a collection of highly optimized building blocks, and an execution engine, to accelerate the pre-processing of the input data for deep learning applications. DALI provides both the performance and the flexibility for accelerating different data pipelines as a single library. This single library can then be easily integrated into different deep learning training and inference applications.
- Full data pipeline--accelerated from reading the disk to getting ready for training and inference.
- Flexibility through configurable graphs and custom operators.
- Support for image classification and segmentation workloads.
- Ease of integration through direct framework plugins and open source bindings.
- Portable training workflows with multiple input formats: JPEG, PNG (fallback to CPU), TIFF (fallback to CPU), BMP (fallback to CPU), raw formats, LMDB, RecordIO, TFRecord.
- Extensible for user-specific needs through open source license.
- Installing or building DALI
- Examples and tutorials
- Additional resources
- Contributing to DALI
- Reporting problems, asking questions
- Contributors
- `cd $DALI_ROOT/docker`_
- `CREATE_RUNNER="YES" ./build.sh`_
- `nvidia-docker run --ipc=host --mount src=/,target=/datadrive/,type=bind -it --rm --network=host --cpus=24 -m 200g --privileged nvidia/dali:py36_cu10.run`_
This will build the source, and place the compiled wheel in the docker container nvidia/dali:py36_cu10_x86_64.build Next, it will create a docker container from the base fiddlev3.azurecr.io/dali_py36_cu10_pytorch:latest (This has pytorch 1.0, CUDA 10, python 3.6, cuDNN and the base dali), and install the compiled dali wheel in this container.
DALI is preinstalled in the NVIDIA GPU Cloud TensorFlow, PyTorch, and MXNet containers in versions 18.07 and later.
Latest DALI release as well as weekly and nightly developer builds can be installed using pip. Detailed instructions can be found in the documentation installation guide. Build instructions for DALI can be found in compilation guide.
Introduction to DALI can be found at Getting started docs page.
The docs/examples directory contains a few examples (in the form of Jupyter notebooks) highlighting different features of DALI and how to use DALI to interface with deep learning frameworks.
Also note:
- Documentation for the latest stable release is available here, and
- Nightly version of the documentation that stays in sync with the master branch is available here.
- GPU Technology Conference 2018; Fast data pipeline for deep learning training, T. Gale, S. Layton and P. Trędak: slides, recording.
- GPU Technology Conference 2019; Fast AI data pre-preprocessing with DALI; Janusz Lisiecki, Michał Zientkiewicz: slides, recording.
- GPU Technology Conference 2019; Integration of DALI with TensorRT on Xavier; Josh Park and Anurag Dixit: slides, recording.
- Developer page.
- Blog post.
We welcome contributions to DALI. To contribute to DALI and make pull requests, follow the guidelines outlined in the Contributing document.
If you are looking for a task good for the start please check one from external contribution welcome label.
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:
- minimal: Use as little code as possible that still produces the same problem.
- complete: Provide all parts needed to reproduce the problem. Check if you can strip external dependency and still show the problem. The less time we spend on reproducing the problems, the more time we can dedicate to the fixes.
- verifiable: Test the code you are about to provide, to make sure that it reproduces the problem. Remove all other problems that are not related to your request.
DALI is being built with major contributions from Trevor Gale, Przemek Tredak, Simon Layton, Andrei Ivanov, Serge Panev.