FrozenGene commented on a change in pull request #7185:
URL: https://github.com/apache/tvm/pull/7185#discussion_r551139319
##########
File path: python/tvm/auto_scheduler/measure.py
##########
@@ -624,12 +647,7 @@ def local_build_worker(args):
The build result of this Builder thread.
"""
inp, build_func, timeout, verbose = args
- if build_func == "default":
- build_func = tar.tar
- elif build_func == "ndk":
- build_func = ndk.create_shared
- else:
- raise ValueError("Invalid build_func" + build_func)
Review comment:
we could add one check `assert any(build_func == name for name in
BuildFunc.nam)`
##########
File path: python/tvm/auto_scheduler/measure.py
##########
@@ -63,6 +63,15 @@
# We use 1e10 instead of sys.float_info.max for better readability in log
MAX_FLOAT = 1e10
+class BuildFunc:
+ """ store build_func name and callable to class variable.
Review comment:
No need of `to class variable`
----------------------------------------------------------------
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]