Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL
All skills

dali-dynamic-mode

Write, review, or migrate DALI dynamic-mode (ndd) code using direct imperative operator calls.

  • Part of NVIDIA/skills
  • 2.1k installs
  • Machine Learning · Training frameworks

When to use it

You have DALI pipeline code using @pipeline_def and pipe.run() and want to convert it to plain Python loops, or you're writing new ndd code and need correct reader, batching, and device handling.

For example

You say

Convert this DALI pipeline-mode image classification script to dynamic mode (ndd): it uses @pipeline_def, fn.readers.file, fn.decoders.image with device="mixed", and pipe.run() with batch_size=64.

You get
  • Rewritten ndd script
  • Reader and batch_size fixes
  • device="gpu" decode change

How it works

  • Readers are stateful: create once and call next_epoch(batch_size=N) each epoch instead of rebuilding.
  • Batch has no indexing; use batch.tensors[i] to pick samples and batch.slice[...] to slice within samples.
  • Checkpointing covers only readers and RNG objects, and readers must opt in with enable_checkpointing=True.

Before installing

NVIDIA DALI must be installed with nvidia.dali.experimental.dynamic importable; GPU decode and GPU operators need a CUDA-capable DALI build and an NVIDIA GPU/driver.

This skill includes a script your assistant may run on your computer.