Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dynamic executor support to TF plugin. #5686

Merged
merged 2 commits into from
Oct 28, 2024
Merged

Conversation

mzient
Copy link
Contributor

@mzient mzient commented Oct 22, 2024

Category:

New feature (non-breaking change which adds functionality)

Description:

This PR adds support for the new dynamic executor to DALI Tensorflow plugin.

Additional information:

Affected modules and functionalities:

Key points relevant for the review:

Tests:

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

Checklist

Documentation

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

DALI team only

Requirements

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

REQ IDs: N/A

JIRA TASK: DALI-4086

Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
<< "B reserved" << meta[i].max_reserved[j] << "B max reserved";
if (j != meta[i].out_num - 1) {
std::cout << ",";
if (pipeline_handle_) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was actually a bug, that could cause a SIGSEGV. One possible trigger was to specify an incomplete output shape in Python.

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [19611845]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [19611845]: BUILD FAILED

@@ -445,6 +451,9 @@ def __init__(
output_shapes = self._handle_deprecation(output_shapes, shapes, "shapes")
output_dtypes = self._handle_deprecation(output_dtypes, dtypes, "dtypes")

if pipeline._exec_dynamic:
exec_dynamic = True
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not move it to the line 487 and do the following there:
self.exec_dynamic = True if pipeline._exec_dynamic else exec_dynamic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought it was more logical to set up arguments first and then do the "business as usual" of populating the fields...

Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [19646278]: BUILD STARTED

"""Test that exec_dynamic is propagated to DALI pipeline from dali_tf.DALIIterator"""
try:
tf.compat.v1.disable_eager_execution()
except ModuleNotFoundError:

Check notice

Code scanning / CodeQL

Empty except Note test

'except' clause does nothing but pass and there is no explanatory comment.
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [19646278]: BUILD PASSED

@mzient mzient merged commit a093d74 into NVIDIA:main Oct 28, 2024
6 checks passed
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.

4 participants