Skip to content

Commit

Permalink
[IR] Fix a primitive check error (apache#5991)
Browse files Browse the repository at this point in the history
* fix primitive check error

* assuming every Op has Type defined

* CHECK_NE -> CHECK

Co-authored-by: Liangfu Chen <[email protected]>
  • Loading branch information
2 people authored and trevor-m committed Jul 14, 2020
1 parent e43b685 commit 6b18557
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/tvm/ir/op.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
CHECK(fn_ty.get() != nullptr);
if (fn_ty->type_constraints.size() != 1) return false;
const TypeRelationNode* rel = fn_ty->type_constraints[0].as<TypeRelationNode>();
if (rel == nullptr) return false;
Expand Down

0 comments on commit 6b18557

Please sign in to comment.