-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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] Python based measure callbacks #7143
Conversation
Per offline discussion, we cast the abstract SearchPolicy to the actual instance so that we can pass it to the packed function. @merrymercy @jcf94 PTAL. |
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.
LGTM. Thanks!
d9bf015
to
a7c600e
Compare
I also took a look at the |
Actually we already have a |
Yeah that's why I bring up this, but my point is these callbacks are C-based instead of Python so there are not that convenient for users to experiment. |
Oh, I find that comment: #7132 (comment)
Also cc @merrymercy @antinucleon |
* add * make it work * format * add poilcy * comment * move test * format * fix ci * Delete useless old code Co-authored-by: Lianmin Zheng <[email protected]>
* add * make it work * format * add poilcy * comment * move test * format * fix ci * Delete useless old code Co-authored-by: Lianmin Zheng <[email protected]>
* add * make it work * format * add poilcy * comment * move test * format * fix ci * Delete useless old code Co-authored-by: Lianmin Zheng <[email protected]>
* add * make it work * format * add poilcy * comment * move test * format * fix ci * Delete useless old code Co-authored-by: Lianmin Zheng <[email protected]>
The current auto_scheduler callbacks can only be implemented in C++. This PR exposes the interface of measure callbacks to Python so that people can plug in their own callback functions easily.
Note: looks like I cannot pass theSearchPolicy
node to thePackedFunc
. Specifically,callback_func(policy, inputs, results);
results in the type mismatching error. This also prevents us from introducing the Python API forSearchCallback
. Any advise is appreciated.cc @merrymercy @jcf94