zhiics commented on a change in pull request #4919: [Relay][Pass] Don't 
consider constants as free vars in MergeComposite
URL: https://github.com/apache/incubator-tvm/pull/4919#discussion_r382398154
 
 

 ##########
 File path: src/relay/pass/merge_composite.cc
 ##########
 @@ -162,9 +164,10 @@ class MergeCompositeWrapper : public ExprMutator {
     CHECK(pattern.defined());
     Map<std::string, Array<Expr>> args_map;
     Map<Expr, Expr> call_map;
-    auto extract = ExtractPattern(pattern, call, &args_map, &call_map);
+    Array<Expr> const_list;
+    auto extract = ExtractPattern(pattern, call, &args_map, &call_map, 
&const_list);
 
 Review comment:
   Can we use members instead of making this API bulky? Then we can also clean 
a bit for the code, i.e. all `ExtractPattern` could only take two parameters 
and `ExtractPattern` for `constantnode` could be removed because it really 
doesn't use `var_map`.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to