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 a bug with Alter Op Layout #6626

Merged
merged 2 commits into from Oct 5, 2020

Conversation

mbrookhart
Copy link
Contributor

@mbrookhart mbrookhart commented Oct 5, 2020

We found a case where models imported from Tensorflow in NHWC layout fail in AlterOpLayout due to an odd combination of passes. This PR adds a regression tests and short-circuits the Scalar optimization to fix the bug.

Tagging @anijain2305 becuase you originally added the Scalar check in Alter Op Layout. You can see the bug if you remove my changes to that check, I don't see a cleaner fix at the moment.

cc @jwfromm @tmoreau89

Copy link
Contributor

@jwfromm jwfromm left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

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.

LGTM, thanks for adding a test case to complement the fix!

@tmoreau89 tmoreau89 merged commit 311eca4 into apache:master Oct 5, 2020
@tmoreau89
Copy link
Contributor

Thank you @mbrookhart @jwfromm the PR has been merged.

TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Oct 13, 2020
* Regression test for a Scalar type issue in Alter Op Layout

* fix the regression test by avoiding the Scalar optimization if types aren't defined
TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Oct 14, 2020
* Regression test for a Scalar type issue in Alter Op Layout

* fix the regression test by avoiding the Scalar optimization if types aren't defined
TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Oct 15, 2020
* Regression test for a Scalar type issue in Alter Op Layout

* fix the regression test by avoiding the Scalar optimization if types aren't defined
TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Oct 16, 2020
* Regression test for a Scalar type issue in Alter Op Layout

* fix the regression test by avoiding the Scalar optimization if types aren't defined
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Oct 19, 2020
* Regression test for a Scalar type issue in Alter Op Layout

* fix the regression test by avoiding the Scalar optimization if types aren't defined
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.

None yet

4 participants