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

Unsqueeze operator with dynamic inout #1624

Merged
merged 1 commit into from
Feb 28, 2023
Merged

Conversation

apbose
Copy link
Collaborator

@apbose apbose commented Jan 27, 2023

The PR consists of the following changes-

  1. Change the use_zeroes parameter to false in shuffle_layer->setReshapeDimensions(), else it is resulting in empty tensor
  2. Test test_unsqueeze.cpp - to test the above changes

In the case of dynamic inputs eg: [1,-1], the util::unsqueezeDims() was changing the dimension [1,1,0] when value 1 was to be inserted at index 1. In shuffle_layer->setReshapeDimensions(), the 0 in the third dimension causes it to get the dimension from input tensor which has length 0 in that dimension. The use_zeroes parameter is set to false so that [1,-1] is reshaped to [1,1,-1] instead.
Fix for issue 1596.

Please delete options that are not relevant and/or add your own.

  • 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)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project (You can use the linters)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas and hacks
  • I have made corresponding changes to the documentation
  • I have added tests to verify my fix or my feature
  • New and existing unit tests pass locally with my changes
  • I have added the relevant labels to my PR in so that relevant reviewers are notified

@github-actions github-actions bot added component: conversion Issues re: Conversion stage component: converters Issues re: Specific op converters component: core Issues re: The core compiler component: tests Issues re: Tests labels Jan 27, 2023
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code conforms to C++ style guidelines

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code conforms to Python style guidelines

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code conforms to C++ style guidelines

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code conforms to Python style guidelines

@apbose apbose assigned narendasan and unassigned narendasan Jan 27, 2023
@apbose apbose removed the request for review from narendasan January 27, 2023 03:58
Copy link
Collaborator

@peri044 peri044 left a comment

Choose a reason for hiding this comment

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

@apbose The test-core-cpp was failing probably due to TensorRT installation. I've restarted the pipeline. Can you fix any failing tests once it completes ?

Copy link
Collaborator

@narendasan narendasan left a comment

Choose a reason for hiding this comment

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

LGTM

@narendasan narendasan merged commit 5b1af77 into main Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed component: conversion Issues re: Conversion stage component: converters Issues re: Specific op converters component: core Issues re: The core compiler component: tests Issues re: Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants