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/07/06 15:19:47 UTC

[GitHub] [incubator-tvm] tqchen commented on a change in pull request #5991: [IR] Fix a primitive check error

tqchen commented on a change in pull request #5991:
URL: https://github.com/apache/incubator-tvm/pull/5991#discussion_r450295937



##########
File path: include/tvm/ir/op.h
##########
@@ -146,6 +146,7 @@ class OpNode : public RelayExprNode {
   // Internal function to compute if it is primitive op
   bool IsPrimitiveOp_() const {
     const auto& fn_ty = this->op_type;
+    if (fn_ty.get() == 0) return false;

Review comment:
       I am not too sure about the change. We should not use `0` in the case of nullptr.
   
   Ideally all Op should have a Type. So instead, we might want to do CHECK(fn_ty != nullptr) here and make sure we register a type for every Op 
   
   
   




----------------------------------------------------------------
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