What problem does it solve?
This Skill helps you implement and troubleshoot DALI dynamic mode (ndd) data loading and preprocessing so you can reliably decode, augment, and feed data to PyTorch without building a pipeline graph.
Core Features & Use Cases
- Imperative dynamic mode workflow: Use nvidia.dali.experimental.dynamic as ndd for operator-by-operator execution with normal Python control flow.
- Correct tensor/batch semantics: Distinguish Tensor vs Batch, use ndd.as_tensor / ndd.as_batch for wrapping, and use batch.select() for choosing samples and batch.slice[...] for slicing within samples.
- Stateful readers and training loops: Create readers once, reuse them across epochs, and iterate using reader.next_epoch(batch_size=...).
- GPU-focused device handling: Decode with device="gpu" for dynamic mode (avoid pipeline-mode device="mixed" concepts) and hand off to PyTorch via .torch().
- Debugging execution timing issues: Use EvalMode.sync_full / sync_cpu to surface errors at the correct call site instead of debugging with scattered evaluate calls.
- Pipeline-mode to dynamic migration: Convert common pipeline patterns like @pipeline_def, pipe.build()/pipe.run(), output.at(i), and pipeline-level seed/threads into the corresponding dynamic-mode constructs.
Quick Start
Ask for DALI dynamic mode guidance to decode JPEGs on the GPU, resize to 224x224, apply ImageNet normalization, and provide a PyTorch-ready training-loop handoff using .torch().