Skip to content

Added workaround for pass-through & small clean up#34

Merged
xupinjie merged 1 commit into
NVIDIA:mainfrom
RmSchaffert:dali_pipeline_framework_fix
Jun 12, 2026
Merged

Added workaround for pass-through & small clean up#34
xupinjie merged 1 commit into
NVIDIA:mainfrom
RmSchaffert:dali_pipeline_framework_fix

Conversation

@RmSchaffert

@RmSchaffert RmSchaffert commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator
  • Added workaround for issue where data passed through the DALI pipeline without changes may become corrupted in some cases
    • Implemented: Copy can be added to selected outputs (set up when creating the pipeline)
    • Adjusted documentation & tests accordingly
  • Clean-up
    • Added support for assigning uint8 data to SampleDataGroup string data fields inside the pipeline; Note that:
      • This is the type used for strings inside the pipeline
      • Assigning to strings inside the pipeline was previously rejected by type checks
    • Renamed a few identifiers & files to improve clarity & added (internal) documentation to some test helpers

Type of Change

Please select (at least one):

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation / examples / tutorials / demos
  • Supporting functionality change (fix or feature in documentation generation, helper scripts, ...)
  • Refactoring / internal change
  • Other (please describe):

Testing

Checklist for testing:

  • Tests added or updated if/as needed
  • Repository test runner executed: scripts/run_tests.sh

Optionally, add a brief description.

Documentation, Examples, Tutorials, Demos

Checklist for documentation:

  • User-facing documentation updated if/as needed (including API docs)
  • Examples / tutorials / demos updated or added (if relevant)
  • Limitations and constraints documented (if relevant)
  • Performance documented (if relevant)
  • Documentation building successful & checks outlined in the Documentation Checks section of the Contribution Guide are performed

Optionally, add a brief description.

Code Quality

Checklist for dependencies:

  • Dependencies updated in the relevant pyproject.toml if/as needed
  • Code formatted according to the Code Formatting Guide

Optionally, add a brief description.

Related Issues / Context

If applicable, link related issues, discussions etc.


DCO / Sign-Off

Please refer to the section on Signing Your Work & Developer Certificate of Origin (DCO)
in the Contribution Guide before submitting your contribution.

References

For additional details, please refer to the Contribution Guide.
The following guides are available (referenced in the Contribution Guide for further details):

Please also refer to the summary checklist in the Contribution Guide,
which is a guideline for what to consider when submitting your contribution and covers the same topics as the checklists above.

@RmSchaffert

Copy link
Copy Markdown
Collaborator Author

/build

4 similar comments
@RmSchaffert

Copy link
Copy Markdown
Collaborator Author

/build

@RmSchaffert

Copy link
Copy Markdown
Collaborator Author

/build

@RmSchaffert

Copy link
Copy Markdown
Collaborator Author

/build

@RmSchaffert

Copy link
Copy Markdown
Collaborator Author

/build

@RmSchaffert RmSchaffert requested a review from xupinjie June 12, 2026 03:37
@RmSchaffert RmSchaffert marked this pull request as ready for review June 12, 2026 03:39
use_parallel_external_source: bool = True,
prefetch_queue_depth: int = 2,
print_sample_data_group_format: bool = False,
copy_external_source_passthrough_outputs: bool = False,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we set the default value to True?

It looks like some versions of DALI have a bug that can cause this issue. Would it be possible to automatically adjust this default value based on the DALI version check, instead of simply setting it to false by default? Otherwise, users who are not familiar with the project may encounter abnormal numerical results the first time they use it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

For example,

import nvidia.dali as dali
from packaging.version import Version

_DALI_VERSION = Version(dali.__version__)
_DALI_PASSTHROUGH_BUG_FIXED = _DALI_VERSION >= Version("X.Y.Z")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good point! Currently, the issue is still present in the newest DALI version. Once it is resolved, we can add the version-based default.

For now, I adjusted the default behavior: If this parameter is not set, all outputs are copied.

However, I would also like to avoid unnecessary overhead. For that, I added a differentiation between setting copy_external_source_passthrough_outputs to True intentionally and leaving it at the default (None). If left at the default, a warning is shown about potential unneeded overhead, and setting any other related parameter (passthrough_copy_field_names etc.) raises an error.

…small clean up

- Added workaround for issue where data passed through the DALI pipeline without changes may become corrupted in some cases
  - Implemented:
    - Copy can be added to selected outputs (set up when creating the pipeline)
    - Default: Copy all outputs and warn user about this auto-selection
  - Adjusted documentation, examples and tests accordingly
- Clean-up
  - Added support for assigning uint8 data to SampleDataGroup string data fields inside the pipeline; Note that:
    - This is the type used for strings inside the pipeline
    - Assigning to strings inside the pipeline was previously rejected by type checks
  - Renamed a few identifiers & files to improve clarity & added (internal) documentation to some test helpers

Signed-off-by: Roman Schaffert <rschaffert@nvidia.com>
@RmSchaffert RmSchaffert force-pushed the dali_pipeline_framework_fix branch from ac618c7 to 98bdbd5 Compare June 12, 2026 10:20
@RmSchaffert

Copy link
Copy Markdown
Collaborator Author

/build

@xupinjie xupinjie merged commit 8da850c into NVIDIA:main Jun 12, 2026
1 check passed
@RmSchaffert

Copy link
Copy Markdown
Collaborator Author

/build

4 similar comments
@RmSchaffert

Copy link
Copy Markdown
Collaborator Author

/build

@RmSchaffert

Copy link
Copy Markdown
Collaborator Author

/build

@RmSchaffert

Copy link
Copy Markdown
Collaborator Author

/build

@RmSchaffert

Copy link
Copy Markdown
Collaborator Author

/build

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants