[AutoScheduler] Add custom build function#7185
Conversation
Signed-off-by: leowang1225 <810916296@qq.com>
@merrymercy @FrozenGene please help to review! |
Signed-off-by: leowang1225 <810916296@qq.com>
|
|
||
| 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": |
There was a problem hiding this comment.
So this is designed to use the class static member?
Why not just use a self.build_func.
There was a problem hiding this comment.
when auto_scheduler.local_builder.build is called, the context can't get LocalBuilder class instance
There was a problem hiding this comment.
He should keep the state information of build_func between functions, so just self.build_func can not meet the requirement because we will create one class instance.
There was a problem hiding this comment.
@FrozenGene @leowang1225
Since we pass the BuildFunc.name to the constructor, how about just register the custom build function by @tvm._ffi.register_func and pass the fuction name to it?
In this way, it can be serialized in args in the local_build_worker below.
Signed-off-by: leowang1225 <810916296@qq.com>
Signed-off-by: leowang1225 <810916296@qq.com>
|
@jcf94 could you have another one round of review? |
|
|
||
| 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": |
There was a problem hiding this comment.
@FrozenGene @leowang1225
Since we pass the BuildFunc.name to the constructor, how about just register the custom build function by @tvm._ffi.register_func and pass the fuction name to it?
In this way, it can be serialized in args in the local_build_worker below.
Sorry for I'm a little busy this afternoon. |
jcf94
left a comment
There was a problem hiding this comment.
Currently I don't have any better suggestions.
Signed-off-by: leowang1225 <810916296@qq.com>
|
Thanks for the great work @leowang1225 and thanks for the reviewing @jcf94 , it is merged now. |
* [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * cheduler] Add custom build function * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com>
* [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * cheduler] Add custom build function * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com>
* [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * cheduler] Add custom build function * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com>
* [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * cheduler] Add custom build function * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com>
* [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * cheduler] Add custom build function * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com> * [AutoScheduler] Add custom build function Signed-off-by: leowang1225 <810916296@qq.com>
Signed-off-by: leowang1225 810916296@qq.com
Thanks for contributing to TVM! Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers by @ them in the pull request thread.