Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoScheduler] Fix custom build func in PopenWorker #8939

Merged
merged 2 commits into from
Sep 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions python/tvm/auto_scheduler/measure.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,10 +661,6 @@ def local_build_worker(args):
The build result of this Builder thread.
"""
inp, build_func, verbose = args
assert build_func == BuildFunc.name, (
"BuildFunc.name: " + BuildFunc.name + ", but args is: " + build_func
)
build_func = BuildFunc.build_func

return _local_build_worker(inp, build_func, verbose)

Expand Down Expand Up @@ -693,6 +689,9 @@ def local_builder_build(inputs, timeout, n_parallel, build_func="default", verbo
res : List[BuildResult]
The build results of these MeasureInputs.
"""
assert build_func == BuildFunc.name, (
"BuildFunc.name: " + BuildFunc.name + ", but args is: " + build_func
)
executor = PopenPoolExecutor(
n_parallel, timeout, reset_global_scope, (AutotvmGlobalScope.current,)
)
Expand All @@ -701,7 +700,7 @@ def local_builder_build(inputs, timeout, n_parallel, build_func="default", verbo
[
(
i.serialize(),
build_func,
BuildFunc.build_func,
Copy link
Contributor

@shingjan shingjan Sep 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are passing the callable function here, should we also change the type of this argument from str to callable at line 655?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, could you send a PR?

verbose,
)
for i in inputs
Expand Down