Skip to content

Support for interpolation (aten::upsample_linear1d, aten::upsample_bilinear2d, aten::upsample_trilinear3d) #89

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

Merged
merged 22 commits into from
Jun 19, 2020

Conversation

abhi-iyer
Copy link
Contributor

@abhi-iyer abhi-iyer commented Jun 9, 2020

Description

Support for aten::upsample_linear1d, aten::upsample_bilinear2d, and aten::upsample_trilinear3d

Added a test for each new op. Removed old, redundant tests.

Created interpolate plugin to handle case if align_corners=False. Added tests for these too, including a serialization test.

at::adaptive_avg_pool2d with dynamic input sized tensors is now supported by the interpolate plugin. Added a test case for this.

Updated main BUILD file, converters BUILD file, and created BUILD for impl/plugins directory.

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • 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 added tests to verify my fix or my feature
  • New and existing unit tests pass locally with my changes

abhi-iyer added 3 commits June 8, 2020 18:22
…nd bilinear2d ops

Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
…d op

Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
…ilinear ops. removed redundant tests

Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
@narendasan narendasan self-requested a review June 9, 2020 03:51
@narendasan narendasan added this to the v0.1.0 milestone Jun 9, 2020
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.

You can use a helper function to simplify those three lines of code, and should there be tests for align corners = false?

…late plugin

Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
…ompiles now. time to test it.

Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
Added support for interpolate plugin, used when align_corners=False and mode is linear
Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
…plugin, works for mode='linear'

Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
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.

Most of these changes are good to go. One request: Can you add a serialization test case to make sure that plugins can be serialized and deserialized. I think what you should probably do is extend hub.py in tests/modules/ to save an additional graph that will use the plugin path (you can just append what ever code you use to generate your test file to the end of hub.py) and then add a case using this file in tests/modules/test_serialization.cpp

… sized tensors

Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
…ut tensors

Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
Signed-off-by: Abhiram Iyer <abhirami@nvidia.com

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
…r adaptive_pool2d

Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
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.

Super minor changes, did you ever try running with FP16?

@narendasan
Copy link
Collaborator

PR Closes #49

@narendasan narendasan linked an issue Jun 19, 2020 that may be closed by this pull request
abhi-iyer and others added 2 commits June 19, 2020 12:06
Signed-off-by: Abhiram Iyer <abhirami@nvidia.com>

Signed-off-by: Abhiram Iyer <abhi.iyer.ai@gmail.com>
Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
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 5127515 into pytorch:master Jun 19, 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.

Dynamic shape is mishandled by aten::adaptive_avg_pooling2d converter
2 participants