You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/10/01 18:08:13 UTC

[GitHub] [incubator-tvm] electriclilies opened a new pull request #6610: [BUG_FIX] Fixes #6608: CHECK(data != nullptr) causes type checking to fail

electriclilies opened a new pull request #6610:
URL: https://github.com/apache/incubator-tvm/pull/6610


   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 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen merged pull request #6610: [BUG_FIX] Fixes #6608: CHECK(data != nullptr) causes type checking to fail

Posted by GitBox <gi...@apache.org>.
tqchen merged pull request #6610:
URL: https://github.com/apache/incubator-tvm/pull/6610


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-tvm] electriclilies commented on a change in pull request #6610: [BUG_FIX] Fixes #6608: CHECK(data != nullptr) causes type checking to fail

Posted by GitBox <gi...@apache.org>.
electriclilies commented on a change in pull request #6610:
URL: https://github.com/apache/incubator-tvm/pull/6610#discussion_r498443856



##########
File path: src/relay/op/tensor/transform.cc
##########
@@ -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) {

Review comment:
       Should be fixed now.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-tvm] electriclilies commented on a change in pull request #6610: [BUG_FIX] Fixes #6608: CHECK(data != nullptr) causes type checking to fail

Posted by GitBox <gi...@apache.org>.
electriclilies commented on a change in pull request #6610:
URL: https://github.com/apache/incubator-tvm/pull/6610#discussion_r498443256



##########
File path: src/relay/op/tensor/transform.cc
##########
@@ -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) {

Review comment:
       whoopsies




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen commented on pull request #6610: [BUG_FIX] Fixes #6608: CHECK(data != nullptr) causes type checking to fail

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #6610:
URL: https://github.com/apache/incubator-tvm/pull/6610#issuecomment-702738177


   Thanks @electriclilies @vegaluisjose @mbrookhart !


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-tvm] mbrookhart commented on a change in pull request #6610: [BUG_FIX] Fixes #6608: CHECK(data != nullptr) causes type checking to fail

Posted by GitBox <gi...@apache.org>.
mbrookhart commented on a change in pull request #6610:
URL: https://github.com/apache/incubator-tvm/pull/6610#discussion_r498439719



##########
File path: src/relay/op/tensor/transform.cc
##########
@@ -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) {

Review comment:
       if (data == nullptr)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org