comaniac commented on a change in pull request #7792:
URL: https://github.com/apache/tvm/pull/7792#discussion_r608010003
##########
File path: python/tvm/driver/tvmc/autotuner.py
##########
@@ -138,7 +138,11 @@ def add_tune_parser(subparsers):
"Autoscheduler options",
"Autoscheduler options, used when --enabled-auto-scheduler is
provided",
)
-
+ auto_scheduler_group = parser.add_argument(
+ "--enable-hardware-params",
+ help="enable hardware specific controls such as cores, threads, memory
etc.",
Review comment:
This argument name and description are unclear to me:
1. When disable, what happen?
2. When enable, how do I "control" hardware specific factors?
3. The action (store false) is also non-intuitive.
The semantic now becomes when we have `--enable-hardware-params`, the rest
hardware parameter arguments are ignored. This doesn't make any sense to me. I
guess the root cause of the confusion is why `--enable-XX` stores false.
Since your motivation of this PR is making sure when users don't want to
care about these parameters, the purpose of this PR is to make the default
hardware parameters more reasonable, and the way it achieves this goal is via
auto-scheduler's default values, which may vary on different platforms.
If the above analysis is correct, then the problem becomes "auto-scheduler
already has a good mechanism to determine the default hardware parameters, do
we still need another set of default values in TVMC"? If the answer is no, then
we could simply aggregate all hardware parameters to a JSON file. In other
words, removing the arguments such as `--num-cores` and add an argument
`--hardware-params <JSON file>`. When this file is not specified, we pass
`None` to auto-scheduler so that the default values will be used. IMHO, only
advance users will use these hardware parameters, so it should be fine to let
them prepare a JSON file for it. We just need to document all available
parameters somewhere, or simply point to the auto-scheduler tutorial to make
sure advance users can find the resource when needed.
--
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]