Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/relax/op/op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,9 @@ StructInfo ReturnTensorToShapeStructInfo(const Call& call, const BlockBuilder& c
const auto* tsinfo = GetStructInfoAs<TensorStructInfoNode>(call->args[0]);
ICHECK(tsinfo && tsinfo->shape.defined());
ShapeExpr shape_expr = Downcast<ShapeExpr>(tsinfo->shape.value());
ICHECK(shape_expr->values.size() == 1);
ICHECK(shape_expr->values.size() == 1) << "relax.tensor_to_shape expected argument to be 1-d, "
<< "but " << call << " has argument " << call->args[0]
<< " with struct info " << call->args[0]->struct_info_;
const IntImmNode* ndim = shape_expr->values[0].as<IntImmNode>();
ICHECK(ndim);
return ShapeStructInfo(ndim->value);
Expand Down