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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]