yongwww commented on code in PR #14481:
URL: https://github.com/apache/tvm/pull/14481#discussion_r1156632098


##########
src/relax/op/tensor/index.cc:
##########
@@ -47,11 +47,10 @@ StructInfo InferStructInfoTake(const Call& call, const 
BlockBuilder& ctx) {
   Array<TensorStructInfo> input_sinfo = GetInputTensorStructInfo(call, ctx);
   TensorStructInfo data_sinfo = input_sinfo[0];
   TensorStructInfo indices_sinfo = input_sinfo[1];
-  if (indices_sinfo->ndim != 1) {
-    ctx->ReportFatal(Diagnostic::Error(call)
-                     << "Take op requires the input indices to be 
1-dimensional tensor. However, "
-                        "the given indices ndim is "
-                     << indices_sinfo->ndim);
+
+  if (indices_sinfo->IsUnknownDtype()) {
+    // TODO(tvm-team): Do we have an equivalent of `ctx->ReportFatal` for 
warning?
+    LOG(WARNING) << "Data type of indice has not been specified. Assume it has 
an integer type.";
   } else if (!indices_sinfo->IsUnknownDtype() &&

Review Comment:
   remove dup check `!indices_sinfo->IsUnknownDtype() &&`



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to