dali-dynamic-mode

Featured

DALI imperative dynamic mode (`nvidia.dali.experimental.dynamic`, ndd): use when working on ndd code or migrating pipelines; skip pipeline-only tasks.

AI & Automation 3,042 stars 352 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# DALI Dynamic Mode ## Purpose Guide AI agents in writing, reviewing, and migrating code that uses DALI's imperative dynamic-mode API, `nvidia.dali.experimental.dynamic` (`ndd`). ## Instructions - Import dynamic mode as `nvidia.dali.experimental.dynamic as ndd` and write code as direct `ndd` calls in ordinary Python; do not use pipeline-mode APIs such as `Pipeline`, `@pipeline_def`, `pipe.build()`, or `pipe.run()`. - Treat readers as stateful: create them once, reuse them across epochs, and pass `batch_size` to `next_epoch(...)`. - Pass explicit `batch_size` to random ops; there is no pipeline-level batch size to inherit. - Use dynamic-mode API conventions: `device="gpu"` instead of pipeline-mode `"mixed"`, `Batch.tensors[...]` for sample selection, and `Batch.slice[...]` for per-sample slicing. - Use `.torch()` to convert a tensor or batch to a PyTorch tensor. Use `pad=True` for batches with variable shapes. ## Prerequisites - To run or validate code, NVIDIA DALI must be installed with dynamic mode importable as `nvidia.dali.experimental.dynamic`. - GPU decode or GPU operators require a CUDA-capable DALI build and an available NVIDIA GPU/driver. - Framework conversion examples require the target framework installed, such as PyTorch for `.torch()`. ## Introduction Dynamic mode is DALI's imperative Python API. It lets code call DALI operators directly from normal Python control flow instead of building and running a pipeline graph. ## Core Data Types ### Tensor -- si...

Details

Author
NVIDIA
Repository
NVIDIA/skills
Created
5 months ago
Last Updated
today
Language
Python
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category