comaniac commented on a change in pull request #7156:
URL: https://github.com/apache/tvm/pull/7156#discussion_r548116114
##########
File path: python/tvm/auto_scheduler/compute_dag.py
##########
@@ -32,7 +32,12 @@
class LayoutRewriteOption:
- """Options for applying layout rewrite."""
+ """
+ Options for applying layout rewrite.
+
+ The NO_REWRITE and INSERT_TRANSFORM_STAGE is expected to be used when
tuning a dependent op,
+ and the REWRITE_FOR_PRE_TRANSFORMED is expected to be used when tuning ops
inside a network.
Review comment:
"dependent op" may be confusing. Could you change to another term that
against to "ops inside a network"?
```suggestion
The NO_REWRITE and INSERT_TRANSFORM_STAGE are expected to be used when
tuning a dependent op,
and the REWRITE_FOR_PRE_TRANSFORMED is expected to be used when tuning
ops inside a network.
```
##########
File path: python/tvm/auto_scheduler/search_task.py
##########
@@ -245,15 +254,18 @@ def tune(self, tuning_options, search_policy=None):
_ffi_api.AutoSchedule(search_policy, tuning_options)
- def apply_best(self, log_file, layout_rewrite_option=None):
+ def apply_best(self, log_file,
layout_rewrite_option=LayoutRewriteOption.NO_REWRITE):
Review comment:
Out of scope: Is it possible to maintain the layout rewrite option in
the record? This semantic indicates that you need to know the right layout
rewrite option when you want to apply a tuned log.
##########
File path: python/tvm/auto_scheduler/search_task.py
##########
@@ -178,6 +178,12 @@ class SearchTask(Object):
The target host device of this search task.
hardware_params : Optional[HardwareParams]
Hardware parameters used in this search task.
+ layout_rewrite_option : LayoutRewriteOption =
LayoutRewriteOption.NO_REWRITE
+ The default layout rewrite option used during program measuring.
+ Cost model will adjust the auto scheduler to find a better schedule
for the specified
+ layout rewrite option.
Review comment:
I think we can directly say "auto_scheduler will find a better schedule
for the specified layout rewrite option". Cost model guided search is too
detail for end users.
----------------------------------------------------------------
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]