icemelon9 commented on a change in pull request #4644: [WIP] Relay op strategy URL: https://github.com/apache/incubator-tvm/pull/4644#discussion_r373139677
########## File path: python/tvm/autotvm/task/dispatcher.py ########## @@ -481,8 +412,12 @@ def _query_inside(self, target, workload): """ if self._counter < len(self._records): cfg = self._records[self._counter][0].config + wkl = self._records[self._counter][0].task.workload + if workload is not None: + assert wkl == workload self._counter += 1 - self.update(target, workload, cfg) + self.update(target, wkl, cfg) + cfg.workload = wkl Review comment: This is only specific to `ApplyGraphBest`. The reason is complicated. Because `ApplyGraphBest` relies on the order of query, we cannot use `relay.backend.compile_engine.select_implement` to collect the autotvm workload as it may query more than once. Therefore, this is a temporary work around that we sneak in the workload in the return cfg. We can remove this part of logic after we make `ApplyGraphBest` no longer relies on the query order. @kevinthesun ---------------------------------------------------------------- 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