kevinthesun commented on a change in pull request #5429:
URL: https://github.com/apache/incubator-tvm/pull/5429#discussion_r416228918
##########
File path: src/relay/transforms/pattern_util.h
##########
@@ -554,7 +554,10 @@ static inline Expr Reshape(Expr data, Array<Integer>
newshape) {
attrs->newshape = std::move(newshape);
attrs->reverse = false;
static const Op& op = Op::Get("reshape");
- return Call(op, {data}, Attrs(attrs), {});
+ std::vector<int> value{1};
+ auto dummy_newshape_tensor = MakeConstantTensor(DataType::Int(32), {1},
value);
Review comment:
Anther way is that we can overload Reshape in pattern_util.h to allow
newshape to be Array, but convert to a Constant inside it before calling actual
Reshape API.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]