zxybazh commented on code in PR #15133:
URL: https://github.com/apache/tvm/pull/15133#discussion_r1270959771
##########
python/tvm/meta_schedule/tir_integration.py:
##########
@@ -58,6 +58,7 @@ def tune_tir( # pylint: disable=too-many-locals
seed: Optional[int] = None,
module_equality: str = "structural",
special_space: Optional[Mapping[str, SpaceGenerator.SpaceGeneratorType]] =
None,
+ **kwargs,
Review Comment:
May I ask if this is specifically added for cost model? If so, IMHO it would
be better to avoid confusion and only add one parameter in cost model's
constructor function instead.
##########
python/tvm/meta_schedule/cost_model/xgb_model.py:
##########
@@ -217,6 +219,8 @@ class XGBConfig(NamedTuple):
nthread : Optional[int],
The number of threads to use.
Default is None, which means to use physical number of cores.
+ tree_method str :
Review Comment:
Typo, might be changed to `tree_method: str`.
##########
python/tvm/meta_schedule/cost_model/xgb_model.py:
##########
@@ -217,6 +219,8 @@ class XGBConfig(NamedTuple):
nthread : Optional[int],
The number of threads to use.
Default is None, which means to use physical number of cores.
+ tree_method str :
Review Comment:
Also, can you please specify the options in the doc? For example what
methods are supported here? In that case you can use `Literal["auto", "...",
"..."]` (replace the dots with other options) as the type annotation.
##########
python/tvm/meta_schedule/tune.py:
##########
@@ -108,7 +109,7 @@ def tune_tasks(
elif not isinstance(database, Database):
database = Database.create(database, module_equality=module_equality)
if not isinstance(cost_model, CostModel):
- cost_model = CostModel.create(cost_model, num_tuning_cores=num_cores)
+ cost_model = CostModel.create(cost_model, num_tuning_cores=num_cores,
**kwargs)
Review Comment:
Same as previous comment, IMHO if we only want to add a single parameter to
the cost model, it might be more specific to directly create a cost model with
`tree_method` parameter or you can modify the default construction parameters.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]