You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "MasterJH5574 (via GitHub)" <gi...@apache.org> on 2023/04/05 17:31:16 UTC

[GitHub] [tvm] MasterJH5574 commented on a diff in pull request #14481: [Unity][Op] Extend `relax.op.take` op to match behavior with `topi.take`.

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


##########
src/relax/op/tensor/index.cc:
##########
@@ -47,13 +47,11 @@ 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);
-  } else if (!indices_sinfo->IsUnknownDtype() &&
-             !(indices_sinfo->dtype.is_int() || indices_sinfo->dtype.is_uint())) {
+
+  if (indices_sinfo->IsUnknownDtype()) {
+    // TODO(tvm-team): Do we have an equivalent of `ctx->ReportFatal` for warning?

Review Comment:
   Leaving as LOG(WARNING) looks fine to me.



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org