You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/07/14 16:08:55 UTC

[GitHub] [incubator-tvm] comaniac commented on a change in pull request #6052: [Relay][Pass] Merge two consecutive reshape ops

comaniac commented on a change in pull request #6052:
URL: https://github.com/apache/incubator-tvm/pull/6052#discussion_r454471458



##########
File path: src/relay/ir/dataflow_matcher.cc
##########
@@ -740,10 +740,10 @@ class PatternRewriter : protected MixedModeMutator {
         groups_ = grouper.GroupMatches(callback_->pattern_, post);
         gid_assignments_ = grouper.GetGIDAssignments();
         memo_.clear();
-        post = this->VisitExpr(post);
+        post = InferType(this->VisitExpr(post));

Review comment:
       I agree to make the InferType optional, but assertion may not work, as one pattern may rewrite a graph multiple times, so the rewritten nodes are still not typed even the original nodes are well typed before running rewriter. One solution is requiring users to manually type new nodes in the rewrite callback, but it seems not trivial.




----------------------------------------------------------------
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:
users@infra.apache.org