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/11/06 11:24:05 UTC

[GitHub] [incubator-tvm] giuseros commented on a change in pull request #6860: [TIR] Add spans to all ExprNodes

giuseros commented on a change in pull request #6860:
URL: https://github.com/apache/incubator-tvm/pull/6860#discussion_r518685847



##########
File path: src/ir/expr.cc
##########
@@ -55,20 +55,21 @@ PrimExpr PrimExpr::FromObject_(ObjectRef ref) {
   return Downcast<PrimExpr>(ref);
 }
 
-IntImm::IntImm(DataType dtype, int64_t value) {
-  ICHECK(dtype.is_scalar()) << "ValueError: IntImm can only take scalar.";
-  ICHECK(dtype.is_int() || dtype.is_uint()) << "ValueError: IntImm supports only int or uint type.";
+IntImm::IntImm(DataType dtype, int64_t value, Span span) {
+  ICHECK(dtype.is_scalar()) << "ValueError: IntImm can only take scalar, but " << dtype << " was supplied.";
+  ICHECK(dtype.is_int() || dtype.is_uint()) << "ValueError: IntImm supports only int or uint type, but " << dtype << " was supplied.";

Review comment:
       Is this related with the "span" change?

##########
File path: src/tir/op/op.cc
##########
@@ -922,4 +922,8 @@ TVM_REGISTER_GLOBAL("tir._OpIfThenElse")
       return if_then_else(cond, true_value, false_value);
     });
 
+TVM_REGISTER_GLOBAL("tir.const_true").set_body_typed([](DataType t) {
+    return const_true(t.lanes());
+});
+

Review comment:
       Is this related with the "span" change?




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