areusch commented on code in PR #10963:
URL: https://github.com/apache/tvm/pull/10963#discussion_r876248763
##########
python/tvm/autotvm/measure/measure_methods.py:
##########
@@ -496,7 +497,8 @@ def set_task(self, task):
def _build_func_common(measure_input, runtime=None, check_gpu=None,
build_option=None):
"""Common part for building a configuration"""
target, task, config = measure_input
- target, task.target_host = Target.check_and_update_host_consist(target,
task.target_host)
+ assert not isinstance(target, (Map, dict)), "It's expected that 'target'
is a string here."
Review Comment:
> Having said that, I would still strongly favour keeping the assertions
inside of the Target API, as it seems as though we're defensively coding around
our own internals here rather than actively wanting to clamp tune to only
accepting these inputs?
i mean sure, i agree, but i think you're asking for a different PR to be
written here. i think it'd be great to merge this
(with the assert moved up to `tune`) as a step in the right direction of
simplifying Target usage, and address the Target thing in a Target-focused PR
rather than a cleanup in another component.
--
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]