sunggg commented on code in PR #14481: URL: https://github.com/apache/tvm/pull/14481#discussion_r1157493620
########## 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: Thanks for catching this! fixed. -- 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-unsubscr...@tvm.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org