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

Pad operator: Add support for per-sample axes and fill_value arguments, and negative axes #3534

Merged
merged 2 commits into from
Dec 1, 2021

Conversation

jantonguirao
Copy link
Contributor

@jantonguirao jantonguirao commented Nov 25, 2021

Signed-off-by: Joaquin Anton janton@nvidia.com

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

Enhanced Pad operator to support the following:

  • Per-sample axes
  • Per-sample fill_value
  • Negative axes [-ndim, ndim-1] (negative values are counted from the back)

This PR also extracts some test utilities to be reused both in Slice and Pad tests, to avoid repetition

Additional information

  • Affected modules and functionalities:

Pad operator

  • Key points relevant for the review:

Changes in pad operator

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 (requirement updated)
  • N/A

REQ IDs: PAD.06

JIRA TASK: DALI-2479

if (shape_.num_elements() == 0) {
shape_ = uniform_list_shape(nsamples, sh);
} else {
for (int i = 0; i < shape_.size(); i++) {
Copy link
Contributor Author

@jantonguirao jantonguirao Nov 25, 2021

Choose a reason for hiding this comment

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

before empty samples were not properly supported (only empty constant).
Note: New tests added to slice to cover that as well

@jantonguirao jantonguirao changed the title Add support for per-sample and negative axes to Pad operator Pad operator: Add support for per-sample axes and fill_value arguments, and negative axes Nov 25, 2021
@jantonguirao jantonguirao marked this pull request as ready for review November 25, 2021 19:33
Signed-off-by: Joaquin Anton <janton@nvidia.com>
@jantonguirao
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3493009]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3493009]: BUILD FAILED

Signed-off-by: Joaquin Anton <janton@nvidia.com>
@jantonguirao
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3499027]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3499027]: BUILD FAILED

@jantonguirao
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3499948]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3499948]: BUILD FAILED

@jantonguirao
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3501892]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3501892]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [3501892]: BUILD PASSED

@jantonguirao jantonguirao merged commit 3c217a9 into NVIDIA:main Dec 1, 2021
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
…s, and negative axes (NVIDIA#3534)

Signed-off-by: Joaquin Anton <janton@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
…s, and negative axes (NVIDIA#3534)

Signed-off-by: Joaquin Anton <janton@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
…s, and negative axes (NVIDIA#3534)

Signed-off-by: Joaquin Anton <janton@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
…s, and negative axes (NVIDIA#3534)

Signed-off-by: Joaquin Anton <janton@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
…s, and negative axes (NVIDIA#3534)

Signed-off-by: Joaquin Anton <janton@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
…s, and negative axes (NVIDIA#3534)

Signed-off-by: Joaquin Anton <janton@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
…s, and negative axes (NVIDIA#3534)

Signed-off-by: Joaquin Anton <janton@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
…s, and negative axes (NVIDIA#3534)

Signed-off-by: Joaquin Anton <janton@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
…s, and negative axes (NVIDIA#3534)

Signed-off-by: Joaquin Anton <janton@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
…s, and negative axes (NVIDIA#3534)

Signed-off-by: Joaquin Anton <janton@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
…s, and negative axes (NVIDIA#3534)

Signed-off-by: Joaquin Anton <janton@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
…s, and negative axes (NVIDIA#3534)

Signed-off-by: Joaquin Anton <janton@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jan 23, 2022
…s, and negative axes (NVIDIA#3534)

Signed-off-by: Joaquin Anton <janton@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Feb 21, 2022
…s, and negative axes (NVIDIA#3534)

Signed-off-by: Joaquin Anton <janton@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request May 13, 2022
…s, and negative axes (NVIDIA#3534)

Signed-off-by: Joaquin Anton <janton@nvidia.com>
cyyever pushed a commit to cyyever/DALI that referenced this pull request Jun 7, 2022
…s, and negative axes (NVIDIA#3534)

Signed-off-by: Joaquin Anton <janton@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