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 GetDimIndices utility to tensor_layout.h #1640

Merged
merged 1 commit into from Jan 13, 2020

Conversation

jantonguirao
Copy link
Contributor

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

Why we need this PR?

Pick one, remove the rest

  • Refactoring to improve code reuse:
    Transforming a set of axis names to axis indices for a given layout (e.g. axis_names="WH" layout="HWC" axes=(1, 0)) is becoming a recurrent pattern

What happened in this PR?

Fill relevant points, put NA otherwise. Replace anything inside []

  • What solution was applied:
    Added a utility function GetDimIndices that calculates the indices of the axis (axes) specified by axis_names given a layout
    Removed copies of the same utility in Slice and Erase operator
  • Affected modules and functionalities:
    Erase and Slice operators
  • Key points relevant for the review:
    The function
  • Validation and testing:
    Pre-existing Slice and Erase tests
  • Documentation (including examples):
    N/A

JIRA TASK: [Use DALI-XXXX or NA]

Signed-off-by: Joaquin Anton <janton@nvidia.com>
@jantonguirao jantonguirao requested a review from a team January 10, 2020 11:30
@jantonguirao
Copy link
Contributor Author

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [1066605]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [1066605]: BUILD PASSED

@jantonguirao jantonguirao merged commit 3f6cb11 into NVIDIA:master Jan 13, 2020
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.

None yet

4 participants