jcf94 commented on a change in pull request #6107:
URL: https://github.com/apache/incubator-tvm/pull/6107#discussion_r458576077
##########
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:
Update to a `_apply_stage_id_offset`, this plays a similar role as the
AttachMap::ApplyStageIdOffset.
##########
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:
Updated to a `_apply_stage_id_offset`, this plays a similar role as the
AttachMap::ApplyStageIdOffset.
----------------------------------------------------------------
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]