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

Upsample support NHWC #10824

Merged
merged 12 commits into from
Apr 11, 2022
Merged

Upsample support NHWC #10824

merged 12 commits into from
Apr 11, 2022

Conversation

yihonglyu
Copy link
Contributor

@yihonglyu yihonglyu commented Mar 9, 2022

  • Implement bilinear interpolation for Upsample/Resize 4-D input with the outermost and innermost scale (usually channel of NHWC) as 1. It is parallelized with output_height * output_width instead of one dimension only.
  • Revert the HandleResize back to the original implementation for TransposeOptimizerTests.TestResize* tests.
  • Add microbenchmark BM_NhwcUpsampleBilinear

@yufenglee
Copy link
Member

TEST(UpsampleOpTest, UpsampleOp4DBilinearTest_int32) {

Please add corresponding NHWC unit test for each NCHW.


Refers to: onnxruntime/test/providers/cpu/tensor/upsample_op_test.cc:410 in 2fe2771. [](commit_id = 2fe2771, deletion_comment = False)

@yihonglyu
Copy link
Contributor Author

TEST(UpsampleOpTest, UpsampleOp4DBilinearTest_int32) {

Please add corresponding NHWC unit test for each NCHW.

Refers to: onnxruntime/test/providers/cpu/tensor/upsample_op_test.cc:410 in 2fe2771. [](commit_id = 2fe2771, deletion_comment = False)

Added

Copy link
Contributor

@RandySheriffH RandySheriffH left a comment

Choose a reason for hiding this comment

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

Tried out the fix with the build on issue , still seeing the gaps.

@yihonglyu
Copy link
Contributor Author

Tried out the fix with the build on issue , still seeing the gaps.

Fix the gaps

@yihonglyu yihonglyu changed the title Fix bug of Upsample NHWC support Upsample support NHWC Apr 6, 2022
@yihonglyu yihonglyu force-pushed the yilyu/nhwc_upsample_v2 branch from 988047b to 280cc11 Compare April 8, 2022 18:22
Copy link
Member

@yufenglee yufenglee left a comment

Choose a reason for hiding this comment

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

:shipit:

@yihonglyu yihonglyu merged commit 749c0dd into master Apr 11, 2022
@yihonglyu yihonglyu deleted the yilyu/nhwc_upsample_v2 branch April 11, 2022 18:39
seddonm1 pushed a commit to seddonm1/onnxruntime that referenced this pull request May 15, 2022
This patch implement bilinear interpolation for Upsample/Resize 4-D input with
the outermost and innermost scale (usually channel of NHWC) as 1. It is
parallelized with output_height * output_width instead of one dimension only.

Besides, I also revert the HandleResize back to the original implementation for
TransposeOptimizerTests.TestResize* tests.

Finally, I add microbenchmark BM_NhwcUpsampleBilinear.
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