FrozenGene commented on a change in pull request #7185:
URL: https://github.com/apache/tvm/pull/7185#discussion_r550388292
##########
File path: python/tvm/auto_scheduler/measure.py
##########
@@ -303,11 +306,16 @@ class LocalBuilder(ProgramBuilder):
This is used in a wrapper of the multiprocessing.Process.join().
n_parallel : int = multiprocessing.cpu_count()
Number of threads used to build in parallel.
- build_func : str = 'default'
- The name of registered build function.
+ build_func: callable or str
Review comment:
add the default value in the comment
##########
File path: python/tvm/auto_scheduler/measure.py
##########
@@ -628,6 +636,8 @@ def local_build_worker(args):
build_func = tar.tar
elif build_func == "ndk":
build_func = ndk.create_shared
+ elif build_func == "custom":
Review comment:
if so, we could use BuildFunc.build_func for all conditions
##########
File path: python/tvm/auto_scheduler/measure.py
##########
@@ -63,6 +63,9 @@
# We use 1e10 instead of sys.float_info.max for better readability in log
MAX_FLOAT = 1e10
+class CustomBuildFunc:
Review comment:
Suggest we use one class BuildFunc, which could store default / ndk /
custom and so on.
----------------------------------------------------------------
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]