leowang1225 commented on a change in pull request #7185:
URL: https://github.com/apache/tvm/pull/7185#discussion_r551682259



##########
File path: python/tvm/auto_scheduler/measure.py
##########
@@ -303,12 +315,28 @@ 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 = "default"
+        If is 'default', use default build function
+        If is 'ndk', use function for android ndk
+        If is callable, use it as custom build function, expect lib_format 
field.
     """
 
     def __init__(self, timeout=15, n_parallel=multiprocessing.cpu_count(), 
build_func="default"):
-        self.__init_handle_by_constructor__(_ffi_api.LocalBuilder, timeout, 
n_parallel, build_func)
+        if build_func == "default":
+            BuildFunc.name = "default"
+            BuildFunc.build_func = tar.tar
+        elif build_func == "ndk":
+            BuildFunc.name = "ndk"
+            BuildFunc.build_func = ndk.create_shared
+        elif not isinstance(build_func, str):
+            BuildFunc.name = "custom"
+            BuildFunc.build_func = build_func

Review comment:
       OK, I have already modified




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to