Skip to content

Support random ops in transparent pipelining#6423

Open
rostan-t wants to merge 3 commits into
NVIDIA:mainfrom
rostan-t:ndd-compile-rng
Open

Support random ops in transparent pipelining#6423
rostan-t wants to merge 3 commits into
NVIDIA:mainfrom
rostan-t:ndd-compile-rng

Conversation

@rostan-t

Copy link
Copy Markdown
Collaborator

Category:

New feature (non-breaking change which adds functionality)

Description:

This PR add support for random operators in transparent pipelining, ensuring parity between eager and compiled modes. When parity is not possible, operators fall back to eager mode when detected during tracing, or error out if a discrepancy happens after tracing.

Additional information:

Affected modules and functionalities:

Dynamic mode, transparent pipelining

Key points relevant for the review:

  • Is the parity between compiled and eager mode preserved?
  • Are there cases where we could be less conservative?

Tests:

  • Existing tests apply
    • test_compile.py
  • New tests added
    • Python tests
    • GTests
    • Benchmark
    • Other
  • N/A

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

Transparent pipelining doesn't have documentation yet.

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: DALI-4670

rostan-t added 2 commits July 13, 2026 10:47
Signed-off-by: Rostan Tabet <rtabet@nvidia.com>
Signed-off-by: Rostan Tabet <rtabet@nvidia.com>
Comment thread dali/test/python/experimental_mode/test_compile.py Dismissed
Comment thread dali/test/python/experimental_mode/test_compile.py Dismissed
Comment thread dali/test/python/experimental_mode/test_compile.py Dismissed
Comment thread dali/python/nvidia/dali/experimental/dynamic/_compile.py Dismissed
Comment thread dali/python/nvidia/dali/experimental/dynamic/_compile.py Dismissed
@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds random-operator support to transparent pipelining. The main changes are:

  • Compiled RNG tracking and random-state injection for pipeline graphs.
  • Eager fallback and runtime checks for unsupported random-call patterns.
  • RNG state helpers for lazy advancement, snapshots, and validation.
  • Tests for compiled/eager parity, fallback behavior, RNG reuse, and GPU random ops.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
dali/python/nvidia/dali/experimental/dynamic/_compile.py Adds compiled RNG ownership, pruning, call-order checks, state syncing, and graph wiring for random operators.
dali/python/nvidia/dali/experimental/dynamic/_ops.py Routes random-state argument creation through shared RNG helper functions.
dali/python/nvidia/dali/experimental/dynamic/random.py Refactors RNG state handling and adds helpers for drawn random-state tensors.
dali/test/python/experimental_mode/test_compile.py Adds compiled random parity tests for multiple RNGs, fallback, reuse, epochs, and GPU execution.
dali/test/python/experimental_mode/test_random.py Updates RNG tests for the helper-based state path and adds coverage for advance.

Reviews (3): Last reviewed commit: "Add compiled rng tests" | Re-trigger Greptile

Comment thread dali/python/nvidia/dali/experimental/dynamic/random.py
Signed-off-by: Rostan Tabet <rtabet@nvidia.com>
@rostan-t

Copy link
Copy Markdown
Collaborator Author

!build

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [57815527]: BUILD STARTED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [57815527]: BUILD PASSED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants