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/08 06:53:29 UTC

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

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



##########
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:
       Thanks for pointing out.
   
   I think I was trying to hash an Op with Type undefined, which led me to `return false` here. Otherwise, I would crash into a segfault error.
   
   This is updated accordingly as suggested.




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