zhiics commented on a change in pull request #5143: [RELAY] Re-wrote the Graph Partitioner to support multiple outputs URL: https://github.com/apache/incubator-tvm/pull/5143#discussion_r397980929
########## File path: src/relay/transforms/partition_graph.cc ########## @@ -364,36 +388,114 @@ class Partitioner : public ExprMutator { IRModule Partition() { auto glob_funcs = module_->functions; - for (const auto& pair : glob_funcs) { - if (auto* fn = pair.second.as<FunctionNode>()) { + for (const auto &pair : glob_funcs) { + if (auto *fn = pair.second.as<FunctionNode>()) { auto func = GetRef<Function>(fn); func = Function(func->params, - VisitExpr(func->body), - func->ret_type, - func->type_params, - func->attrs); + VisitExpr(func->body), + func->ret_type, + func->type_params, + func->attrs); module_->Update(pair.first, func); } } return module_; } private: - int var_id_{0}; - int subgraph_id_{0}; - std::unordered_set<std::shared_ptr<Subgraph>> subgraphs_; + /*! + * \brief Get the region an expression belongs to Review comment: align "*", same to the other functions below. ---------------------------------------------------------------- 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