masahi commented on a change in pull request #5623:
URL: https://github.com/apache/incubator-tvm/pull/5623#discussion_r427262080



##########
File path: src/relay/transforms/merge_composite.cc
##########
@@ -122,8 +122,10 @@ class MergeCompositeWrapper : public ExprMutator {
     for (const auto& arg : pattern->args) {
       Expr new_arg;
       if (arg->IsInstance<CallNode>()) {
-        new_arg =
-            ExtractPattern(Downcast<Call>(arg), Downcast<Call>(root->args[i]), 
var_map, call_map);
+        if (root->args[i]->IsInstance<CallNode>()) {

Review comment:
       Move this condition to the `if` in L124. 
   
   ```if (arg->IsInstance<CallNode>() && root->args[i]->IsInstance<CallNode>()) 
{ ... }```




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


Reply via email to