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

Input device check #5631

Merged
merged 6 commits into from
Sep 16, 2024
Merged

Input device check #5631

merged 6 commits into from
Sep 16, 2024

Conversation

mzient
Copy link
Contributor

@mzient mzient commented Sep 10, 2024

Category:

New feature (non-breaking change which adds functionality)

Description:

This PR extends input device specification in OpSchema and adds input device validateion to OpSpec.

Additional information:

Affected modules and functionalities:

Key points relevant for the review:

Tests:

Some tests were modified.

  • 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: N/A

@mzient
Copy link
Contributor Author

mzient commented Sep 10, 2024

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [18307567]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [18305355]: BUILD FAILED

@mzient
Copy link
Contributor Author

mzient commented Sep 10, 2024

!build

@NVIDIA NVIDIA deleted a comment from dali-automaton Sep 10, 2024
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [18309171]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [18309171]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [18324189]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [18324189]: BUILD FAILED

mzient added a commit that referenced this pull request Sep 11, 2024
* Add experimental_exec_dynamic flag to Pipeline to enable new executor
* Add DataNode.cpu() that triggers a GPU->CPU copy
* Remove checks that prevented GPU->CPU transitions from Python and Pipeline class
* Remove checks that prevented CPU operators from taking GPU inputs
* Use old executor's graph lowering to run the checks
* Add cpu->gpu tests

* TODO: Improve input backend checks (#5631)
* TODO: Add tensorflow support

---------

Signed-off-by: Michal Zientkiewicz <[email protected]>
mzient and others added 3 commits September 11, 2024 20:14
Signed-off-by: Michał Zientkiewicz <[email protected]>
Signed-off-by: Michał Zientkiewicz <[email protected]>
Signed-off-by: Michał Zientkiewicz <[email protected]>
bool has_shape_, has_dtype_;
DALIDataType dtype_;

bool has_const_value_ = false;
int const_value_ = 0;

const int kShapeLikeInputIdx = is_shape_like_ ? 0 : -1;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are not compile-time kOnstants - just regular fields.

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [18338618]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [18338618]: BUILD FAILED

Signed-off-by: Michał Zientkiewicz <[email protected]>
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [18356254]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [18356254]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [18433207]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [18433770]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [18433770]: BUILD PASSED

@mzient mzient merged commit 869afb3 into NVIDIA:main Sep 16, 2024
6 checks passed
stiepan pushed a commit that referenced this pull request Sep 18, 2024
* Check input device in OpSpec::AddInput.
* Add `Any` and `MatchBackendOrCPU` input devices
* Fix InputDevice in operators. Add Any device capability to "shape_like" inputs.
* Add python-side backend validation in logical expressions.

---------

Signed-off-by: Michal Zientkiewicz <[email protected]>
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