[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. |
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 <lianminzheng@gmail.com>
* add * make it work * format * add poilcy * comment * move test * format * fix ci * Delete useless old code Co-authored-by: Lianmin Zheng <lianminzheng@gmail.com>
* add * make it work * format * add poilcy * comment * move test * format * fix ci * Delete useless old code Co-authored-by: Lianmin Zheng <lianminzheng@gmail.com>
* add * make it work * format * add poilcy * comment * move test * format * fix ci * Delete useless old code Co-authored-by: Lianmin Zheng <lianminzheng@gmail.com>
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 theSearchPolicynode 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