manupa-arm commented on a change in pull request #8509:
URL: https://github.com/apache/tvm/pull/8509#discussion_r794475756



##########
File path: src/relay/transforms/fuse_ops.cc
##########
@@ -1017,18 +1050,30 @@ class FuseMutator : private MixedModeMutator {
   }
 };
 
-Expr FuseOps(const Expr& expr, int fuse_opt_level, size_t max_fuse_depth, 
const IRModule& module) {
-  return FuseMutator().Transform(expr, fuse_opt_level, max_fuse_depth);
+Expr FuseOps(const Expr& expr, int fuse_opt_level, size_t max_fuse_depth, bool 
link_params,
+             const IRModule& module) {
+  return FuseMutator()

Review comment:
       Could we use a constructor to set these values ? -- Insread of calling a 
chain of Setters.

##########
File path: src/relay/transforms/fuse_ops.cc
##########
@@ -809,8 +811,31 @@ std::vector<GraphPartitioner::Group*> 
GraphPartitioner::Partition(
 
 class FuseMutator : private MixedModeMutator {
  public:
+  int GetFuseOptLevel() { return fuse_opt_level_; }
+  size_t GetMaxFuseDepth() { return max_fuse_depth_; }
+  bool GetLinkParams() { return link_params_; }
+
+  FuseMutator* SetFuseOptLevel(int fuse_opt_level) {

Review comment:
       Why cant we just use a constructor with defaults to set these ? 

##########
File path: src/ir/module.cc
##########
@@ -219,6 +224,64 @@ void IRModuleNode::AddUnchecked(const GlobalVar& var, 
const BaseFunc& func) {
   global_var_map_.Set(var->name_hint, var);
 }
 
+// Replaces constant data to index into mod's "Constants" attrs array.
+// Only processes tir::PrimFunc and ingnores everything else

Review comment:
       typo; ignores

##########
File path: include/tvm/ir/module.h
##########
@@ -349,6 +390,9 @@ class IRModuleNode : public Object {
    */
   std::unordered_set<String> import_set_;
   friend class IRModule;
+
+ public:
+  void ExtractPrimFuncConstants(BaseFunc func);

Review comment:
       Shall we rename this to  "ExtractConstants" ?




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to