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

[BUG_FIX] Fixes #6608: CHECK(data != nullptr) causes type checking to fail #6610

Merged
merged 3 commits into from Oct 2, 2020

Conversation

electriclilies
Copy link
Contributor

Some type rels check that argument types are not null. In certain cases, this can cause the type inferencer to exit prematurely, and the model cannot be run.

Instead of checking that argument types are not null, type rels should just return false, and allow the type checker to determine if the type of arguments cannot be inferred.

I believe this PR fixes all of the type rels with this issue, however I could have missed some. If you find another, please let me know.

See issue #6608 for more details.

cc @jwfromm @vegaluisjose @areusch @mbrookhart

Copy link
Contributor

@mbrookhart mbrookhart left a comment

Choose a reason for hiding this comment

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

One logical bug, but otherwise looks great 💯

@@ -1979,7 +1985,11 @@ bool StridedSliceRel(const Array<Type>& types, int num_inputs, const Attrs& attr
const StridedSliceAttrs* param = attrs.as<StridedSliceAttrs>();
CHECK(param != nullptr);
const auto* data = types[0].as<TensorTypeNode>();
CHECK(data != nullptr);

if (data != nullptr) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if (data == nullptr)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whoopsies

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should be fixed now.

@tqchen tqchen merged commit 7e671cb into apache:master Oct 2, 2020
@tqchen
Copy link
Member

tqchen commented Oct 2, 2020

Thanks @electriclilies @vegaluisjose @mbrookhart !

@electriclilies electriclilies deleted the bug_fix_data!=nullptr branch October 2, 2020 17:43
TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Oct 13, 2020
TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Oct 14, 2020
TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Oct 15, 2020
TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Oct 16, 2020
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Oct 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.

None yet

4 participants