-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[AutoSchedule] Extract tasks via compile engine #6903
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
Conversation
3e86662 to
0c97732
Compare
|
At a high level, it seems to me this may benefit from the refactor I proposed in #6888. In particular, rather than switching the behaviour of ScheduleGetter with a flag it may make more sense to simply provide an alternative ScheduleGetter for the auto-scheduler. With a 'TETranslator' de-coupled, we should be able to avoid duplicating lots of code. What are your thoughts? |
This PR can definitely work with #6888 to have a more concise implementation. However, this PR needs more than a TE translator, and that's why I exposed it first to have more discussions instead of waiting for #6888. Although we might be able to simplify the changes of |
d4c3e6e to
5cd1fb1
Compare
merrymercy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The auto-scheduler part looks good to me.
Other people can comment more on whether adding use_auto_schedule to all compile engine functions is a good design.
bd9cef8 to
7e60a2b
Compare
|
@merrymercy @zhiics thanks for the review and the comments are addressed. PTAL. |
|
please rebase |
7e60a2b to
5eb2756
Compare
5eb2756 to
757c6f7
Compare
|
Comment addressed. Now we could also use the flag in PassContext to add the TOPI compute for auto_scheduler with higher plevel (e.g., 15). Since this changes one task from direct to Winograd in the tutorial, I'm re-generating CI logs for the tutorial and will update it tomorrow. |
c6a8ae7 to
7e846a4
Compare
7e846a4 to
d2afb93
Compare
jcf94
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature is awesome! Thanks!
|
Thanks everyone. |
* make use TOPI schedule optional * extract auto_schedule task * format * add extract mode * silent autotvm * fallback to TOPI * use PassContext * lint * surpass fallback warnings * nit * fix test * address comments * address comments * doc * address comments * lint * skip unsupported tasks * reigger CI
* make use TOPI schedule optional * extract auto_schedule task * format * add extract mode * silent autotvm * fallback to TOPI * use PassContext * lint * surpass fallback warnings * nit * fix test * address comments * address comments * doc * address comments * lint * skip unsupported tasks * reigger CI
* make use TOPI schedule optional * extract auto_schedule task * format * add extract mode * silent autotvm * fallback to TOPI * use PassContext * lint * surpass fallback warnings * nit * fix test * address comments * address comments * doc * address comments * lint * skip unsupported tasks * reigger CI
See RFC: https://discuss.tvm.apache.org/t/rfc-a-general-task-extraction-mechanism-for-auto-scheduler/8444 for details.
Change highlight:
auto_scheduler.extract_tasks.PassContext(config={"relay.backend.use_auto_schedule": True})when compilation.auto_scheduler.enable_relay_integration.include_simple_task=False. When setting it toTrue, the tasks with only injective ops will be extracted as well.plevel.extern,hybridops).auto_scheduler.FallbackContext.silenttoverbose. It can be 0 (silent), 1 (only warn the missing configs for workload with complex ops, default), and 2 (warn all missing configs).This PR is ready for review. cc @merrymercy @tqchen @zhiics @jcf94 @icemelon9.
TODO