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

TensorList shape #3591

Merged
merged 5 commits into from
Jan 11, 2022
Merged

TensorList shape #3591

merged 5 commits into from
Jan 11, 2022

Conversation

ksztenderski
Copy link
Contributor

@ksztenderski ksztenderski commented Dec 21, 2021

Description

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (Redesign of existing code that doesn't affect functionality)
  • Other (e.g. Documentation, Tests, Configuration)

What happened in this PR

Adds shape method to TensorListCPU/GPU and DataNodeDebug.

Additional information

  • Affected modules and functionalities:

TensorListCPU/GPU
DataNodeDebug

  • Key points relevant for the review:

Checklist

Tests

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

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

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
@ksztenderski
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3635530]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3635530]: BUILD PASSED

Copy link
Contributor

@klecki klecki left a comment

Choose a reason for hiding this comment

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

Looks ok, please add a dedicated test for TensorList.

Also as a bonus question: can we impact the type of the return value shown in the docstring anyhow?

Screenshot 2021-12-22 at 18-33-35 Types — NVIDIA DALI 1 10 0dev documentation
I wonder if we can make it -> list of tuples or list[tuple] (or however it is according to Python type annotations). (Just curious if it's possible, it would be nice to have but it's not a blocker).

@@ -693,6 +702,10 @@ void ExposeTensorList(py::module &m) {
.def("layout", [](TensorList<CPUBackend> &t) {
return t.GetLayout().str();
})
.def("shape", &py_shape_list<CPUBackend>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a test for this in the test_backend_impl.py or similar? Produce a TensorList of known shape and check if it returns it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, managed to change the type of the return value in the docstring as well.

Screenshot 2022-01-04 110730

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
@ksztenderski
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3669100]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3669100]: BUILD FAILED

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
@ksztenderski
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3672611]: BUILD STARTED

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
@ksztenderski
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3672877]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3672877]: BUILD PASSED

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
@ksztenderski
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3673161]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3673161]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3673161]: BUILD PASSED

@ksztenderski ksztenderski merged commit a3965c7 into NVIDIA:main Jan 11, 2022
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
Add shape to TensorListCPU/GPU and DataNodeDebug

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
Add shape to TensorListCPU/GPU and DataNodeDebug

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
Add shape to TensorListCPU/GPU and DataNodeDebug

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
Add shape to TensorListCPU/GPU and DataNodeDebug

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
Add shape to TensorListCPU/GPU and DataNodeDebug

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
Add shape to TensorListCPU/GPU and DataNodeDebug

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
Add shape to TensorListCPU/GPU and DataNodeDebug

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
Add shape to TensorListCPU/GPU and DataNodeDebug

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
Add shape to TensorListCPU/GPU and DataNodeDebug

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
Add shape to TensorListCPU/GPU and DataNodeDebug

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
Add shape to TensorListCPU/GPU and DataNodeDebug

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
Add shape to TensorListCPU/GPU and DataNodeDebug

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
Add shape to TensorListCPU/GPU and DataNodeDebug

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Feb 21, 2022
Add shape to TensorListCPU/GPU and DataNodeDebug

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request May 13, 2022
Add shape to TensorListCPU/GPU and DataNodeDebug

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jun 7, 2022
Add shape to TensorListCPU/GPU and DataNodeDebug

Signed-off-by: ksztenderski <ksztenderski@nvidia.com>
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