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

int32 pooling with int64 shapes #6687

Merged

Conversation

mbrookhart
Copy link
Contributor

@mbrookhart mbrookhart commented Oct 14, 2020

We found some quantized models that were performing Int32 average pooling with input tensors that had Int64 shapes. This caused an error in te where the resulting computations were implicitly up cast from int32 to int64 due to the way the topi functions were handling input shapes.

This PR adds unit tests that hit the error and provides fixes for the currently implemented ops.

@tmoreau89 @jwfromm @junrushao1994

@mbrookhart mbrookhart changed the title Mbrookhart/int32 pooling with int64 shapes int32 pooling with int64 shapes Oct 14, 2020
Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

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

This PR addresses a deeply underlying issue that results in incorrect data types during model compilation. Thanks for diving deep into the bug and the fix!

Copy link
Contributor

@tmoreau89 tmoreau89 left a comment

Choose a reason for hiding this comment

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

Awesome work @mbrookhart, thanks for the fix.

@tqchen tqchen merged commit b121278 into apache:main Oct 15, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Oct 29, 2020
* Failing tests for Int32 avg_pooling with Int64 shapes

* fix pooling implementations
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Dec 2, 2020
* Failing tests for Int32 avg_pooling with Int64 shapes

* fix pooling implementations
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Dec 4, 2020
* Failing tests for Int32 avg_pooling with Int64 shapes

* fix pooling implementations
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Dec 4, 2020
* Failing tests for Int32 avg_pooling with Int64 shapes

* fix pooling implementations
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