Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Nvidia DALI tutorial #31

Merged
merged 5 commits into from
May 4, 2022
Merged

Add Nvidia DALI tutorial #31

merged 5 commits into from
May 4, 2022

Conversation

axkoenig
Copy link
Contributor

@axkoenig axkoenig commented Apr 11, 2022

Description

Summary

  • Integrated Squirrel and DALI by defining an "external source" for a DALI Pipeline (read more here)
  • Why do that? DALI is a library that is highly optimised for computations on the GPU. With this integration we get very fast image augmentations and other image processing that DALI offers, right out of the box.
  • Tested on cloud machine with 1 Nvidia Tesla T4
  • This tutorial is based on the squirrel Catalog API. For the benchmarks, we used a local MessagePack copy of the CIFAR dataset instead, which was much faster than the Catalog API.

Required dependencies (also mentioned in code)

pip install cupy-cuda113 squirrel-core squirrel-datasets-core
pip install --extra-index-url https://developer.download.nvidia.com/compute/redist --upgrade nvidia-dali-cuda110

Script prints

Building pipeline ...
Iterating over dataset ...
Data in torch format!
Iteration speed: 2213.6659146588822 samples per second
Done. Have a nice day.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring including code style reformatting
  • Other (please describe):

Checklist:

  • I have read the contributing guideline doc (external contributors only)
  • Lint and unit tests pass locally with my changes
  • I have kept the PR small so that it can be easily reviewed
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • All dependency changes have been reflected in the pip requirement files.

@axkoenig axkoenig requested review from AlirezaSohofi and winfried-ripken and removed request for winfried-ripken April 11, 2022 14:22
@winfried-ripken winfried-ripken self-requested a review May 4, 2022 14:50
Copy link
Contributor

@winfried-ripken winfried-ripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Alex!

@axkoenig axkoenig merged commit c023ea0 into main May 4, 2022
@axkoenig axkoenig deleted the ak-add-dali-tutorial branch May 4, 2022 14:51
@github-actions github-actions bot locked and limited conversation to collaborators May 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants