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_r382401041
 
 

 ##########
 File path: src/relay/pass/merge_composite.cc
 ##########
 @@ -182,6 +185,27 @@ class MergeCompositeWrapper : public ExprMutator {
   }
 
  private:
+  /*! \brief Returns all free vars from expr that are not constants */
+  Array<Var> GetFreeVarsWithoutConst(const Expr& expr, const Array<Expr>& 
const_list) {
+    Array<Var> free_vars_without_const;
+    auto free_vars = FreeVars(expr);
+    for (const auto& free_var : free_vars) {
+      bool is_const = false;
+      for (const auto& const_var : const_list) {
+        if (free_var.get() == const_var.get()) {
 
 Review comment:
   just `free_var == const_var`?

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


With regards,
Apache Git Services

Reply via email to