From e4a0aa5ae2c92f4c4753707affee5dea15a9d2c9 Mon Sep 17 00:00:00 2001 From: Liangfu Chen Date: Tue, 14 Jul 2020 11:16:49 +0800 Subject: [PATCH] [IR] Fix a primitive check error (#5991) * fix primitive check error * assuming every Op has Type defined * CHECK_NE -> CHECK Co-authored-by: Liangfu Chen --- include/tvm/ir/op.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/tvm/ir/op.h b/include/tvm/ir/op.h index 9a91302..e7b3577 100644 --- a/include/tvm/ir/op.h +++ b/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; + CHECK(fn_ty.get() != nullptr); if (fn_ty->type_constraints.size() != 1) return false; const TypeRelationNode* rel = fn_ty->type_constraints[0].as(); if (rel == nullptr) return false; -- 2.7.4