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



##########
File path: src/relay/transforms/partition_graph.cc
##########
@@ -124,37 +112,40 @@ class AnnotationChecker : public ExprVisitor {
  *         the compiler name.
  */
 
-class Partitioner : public ExprMutator {
+class Partitioner : public MixedModeMutator {
  public:
   explicit Partitioner(const IRModule& module) : module_(module) {
     for (auto f : module->functions) {
       GlobalVar f_var = f.first;
       BaseFunc f_func = f.second;
 
-      // Creating regionset per function in the module
+      // Creating regionset per function in the module.
       auto region_set = AnnotatedRegionSet::Create(f_func, 
partitioning::compiler_begin_op,
                                                    
partitioning::compiler_end_op);
       regions_sets_[region_set] = f_func;
+
+      // Initial region function metadata.
+      for (auto region : region_set) {
+        region_func_meta_[region];

Review comment:
       Do we need this? Since `region_func_meta_` is always accessed without 
checking, I think it will be default-constructed anyway on the first access.




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


Reply via email to