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

Fix Transpose operator for batch size 1 as well as 1 channel images #1624

Merged
merged 1 commit into from
Jan 2, 2020
Merged

Fix Transpose operator for batch size 1 as well as 1 channel images #1624

merged 1 commit into from
Jan 2, 2020

Conversation

JanuszL
Copy link
Contributor

@JanuszL JanuszL commented Jan 2, 2020

  • Transpose has a special code path for transposing data with one or more
    dimensions shapes equal 1 as cuTT doesn't handle this situation. However,
    this code path is wrong
  • Corrects the logic removing shapes equal to 1 and permutation connected to it.
  • Add logic to update the remaining permutation elements after removal of the one
    corresponding to shapes equal to 1
  • Adds more test to permutation operator

Signed-off-by: Janusz Lisiecki jlisiecki@nvidia.com

Why we need this PR?

  • It fixes a bug in the Transpose operator for batch size 1 as well as 1 channel images

What happened in this PR?

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

  • What solution was applied:
    Transpose has a special code path for transposing data with one or more dimensions shapes equal 1 as cuTT doesn't handle this situation. However, this code path is wrong
    Corrects the logic removing shapes equal to 1 and permutation connected to it.
    Add logic to update the remaining permutation elements after removal of the one corresponding to shapes equal to 1
  • Affected modules and functionalities:
    Transpose operator
  • Key points relevant for the review:
    NA
  • Validation and testing:
    Adds more test to permutation operator
  • Documentation (including examples):
    No

JIRA TASK: [NA]

- Transpose has a special code path for transposing data with one or more
  dimensions shapes equal 1 as cuTT doesn't handle this situation. However,
  this code path is wrong
- Corrects the logic removing shapes equal to 1 and permutation connected to it.
- Add logic to update the remaining permutation elements after removal of the one
  corresponding to shapes equal to 1
- Adds more test to permutation operator

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@JanuszL JanuszL mentioned this pull request Jan 2, 2020
@JanuszL
Copy link
Contributor Author

JanuszL commented Jan 2, 2020

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [1054196]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [1054196]: BUILD PASSED

@@ -114,15 +114,16 @@ def check_transpose_layout(device, batch_size, shape, in_layout, permutation,

def test_transpose_layout():
batch_size = 3
Copy link
Contributor

Choose a reason for hiding this comment

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

you can remove this line

@jantonguirao jantonguirao merged commit f29a5d3 into NVIDIA:master Jan 2, 2020
@JanuszL JanuszL deleted the fix_transpose branch January 2, 2020 22:44
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