jcf94 commented on a change in pull request #6107:
URL: https://github.com/apache/incubator-tvm/pull/6107#discussion_r458559616



##########
File path: python/tvm/auto_scheduler/loop_state.py
##########
@@ -371,6 +433,23 @@ def _update_stage_id_map(self):
         for index, stage in enumerate(self.stages):
             self.stage_id_map[stage.op] = index
 
+    def _insert_new_stage(self, new_stage_id):
+        added_op = self.stages[new_stage_id].op
+
+        # Add a new stage will change all ops. But we still want to use the 
old ops to index stages,
+        # So we keep updating them and do not remove the old ops.

Review comment:
       - This is an internal function which should not be called outside, seems 
the docstring is unnecessary.
   - This function actuall means insert a new stage to the id map(add should 
modify the stage id behind this stage after the insert), will consider for a 
better name.
   - Good point.
   - This will be used in Rfactor, too.




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