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:
[email protected]


Reply via email to