You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/08/18 09:50:44 UTC
[GitHub] [incubator-tvm] jcf94 commented on a change in pull request #6297: [Ansor][AutoTVM v2.0] Phase 2: Layout Rewrite in AutoScheduler
jcf94 commented on a change in pull request #6297:
URL: https://github.com/apache/incubator-tvm/pull/6297#discussion_r472052291
##########
File path: include/tvm/auto_scheduler/compute_dag.h
##########
@@ -205,19 +205,28 @@ class ComputeDAG : public ObjectRef {
*/
TVM_DLL explicit ComputeDAG(Array<te::Tensor> tensors);
+ /*!
+ * \brief Rewrite the layout of placeholder specified by attr `layout_free_placeholders`
+ * according to the loop nest derived with `transform_steps`.
+ * \param transform_steps Transform steps of a state.
+ */
+ void RewriteLayout(
+ const Array<Step> &transform_steps);
Review comment:
Format... This should be fixed if these codes can pass the CI.
##########
File path: python/tvm/auto_scheduler/compute_dag.py
##########
@@ -72,7 +72,7 @@ def get_init_state(self):
"""
return State(self.init_state, self)
- def apply_steps_from_state(self, state):
+ def apply_steps_from_state(self, state, layout_rewrite=False):
Review comment:
Add layout_rewrite to the doc string below.
##########
File path: python/tvm/auto_scheduler/measure.py
##########
@@ -419,7 +419,7 @@ def timed_func():
try:
sch, args = task.compute_dag.apply_steps_from_state(
- inp.state)
+ inp.state, layout_rewrite=True)
Review comment:
Consider to get the `layout_rewrite` parameter from outside? (e.g. from GLOBAL_BUILD_ARGUMENTS)
It's not so good to just set it `True`.
----------------------------------------------------------------
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:
users@infra.apache.org