tkonolige commented on a change in pull request #7330:
URL: https://github.com/apache/tvm/pull/7330#discussion_r563867171



##########
File path: src/ir/expr.cc
##########
@@ -49,7 +49,7 @@ PrimExpr PrimExpr::FromObject_(ObjectRef ref) {
   if (auto* ptr = ref.as<runtime::StringObj>()) {
     return tir::StringImm(GetRef<runtime::String>(ptr));
   }
-  ICHECK(ObjectTypeChecker<PrimExpr>::Check(ref.get()))
+  ICHECK(!static_cast<bool>(ObjectTypeChecker<PrimExpr>::Mismatch(ref.get())))
       << "Expect type " << ObjectTypeChecker<PrimExpr>::TypeName() << " but 
get "
       << ref->GetTypeKey();

Review comment:
       I'm using `ICHECK(!checked_type.defined())` in other places, so I'll use 
that here.




----------------------------------------------------------------
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:
[email protected]


Reply via email to