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

[microTVM][AutoTVM] Fix autotvm bug and tests #9003

Merged
merged 5 commits into from
Sep 14, 2021

Conversation

mehrdadh
Copy link
Member

microTVM autotvm is still broken and our zephyr/crt tests doesn't catch the error. This PR fixed the autotvm and change the tests to capture autotvm error.

cc @areusch @tkonolige

Copy link
Contributor

@tkonolige tkonolige left a comment

Choose a reason for hiding this comment

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

Looks good. I'm glad autotvm now works with microtvm!

@@ -162,7 +162,7 @@
n_trial=num_trials,
measure_option=measure_option,
callbacks=[
tvm.autotvm.callback.log_to_file("microtvm_autotune.log"),
tvm.autotvm.callback.log_to_file("microtvm_autotune.log.txt"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the double extension here?

Copy link
Member Author

Choose a reason for hiding this comment

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

to be consistent with cleanup step in doc stage:

rm -rf /tmp/$$.log.txt

tutorials/micro/micro_autotune.py Outdated Show resolved Hide resolved
@@ -691,11 +691,13 @@ void RPCEndpoint::Init() {
* the key to modify their behavior.
*/
std::shared_ptr<RPCEndpoint> RPCEndpoint::Create(std::unique_ptr<RPCChannel> channel,
std::string name, std::string remote_key) {
std::string name, std::string remote_key,
TypedPackedFunc<void()> fshutdown) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@tqchen this is needed when a Python-side session constructor may keep a reference to the underlying session. Does it make sense to you?

Copy link
Contributor

Choose a reason for hiding this comment

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

TQ requests change to fcleanup

Copy link
Contributor

@areusch areusch left a comment

Choose a reason for hiding this comment

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

thanks @mehrdadh!

@@ -143,6 +144,9 @@ def __exit__(self, exc_type, exc_value, exc_traceback):
"""Tear down this session and associated RPC session resources."""
self.transport.__exit__(exc_type, exc_value, exc_traceback)

def _shutdown(self):
self.__exit__(None, None, None)
Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps for a future cleanup: let's ensure we avoid double-calling __exit__ by checking some local var to determine whether we did already.

@@ -190,6 +192,8 @@ class RPCEndpoint {
std::string name_;
// The remote key
std::string remote_key_;
// The shutdown Packed Function
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: say something more like: "invoked when the RPC session is terminated"

@areusch areusch merged commit dc2f70e into apache:main Sep 14, 2021
@mehrdadh mehrdadh deleted the fix_micro_autotvm branch September 15, 2021 07:13
areusch pushed a commit that referenced this pull request Sep 17, 2021
* fix test and cleanup

* fix tutorial doc

* fix verbose for tutorial

* fix tune check

* address comments

* address comments
ylc pushed a commit to ylc/tvm that referenced this pull request Sep 29, 2021
* debuggging

* cleanup and fix tutorial, zephyr and crt test

* fix crt test

* address comments
ylc pushed a commit to ylc/tvm that referenced this pull request Sep 29, 2021
* fix test and cleanup

* fix tutorial doc

* fix verbose for tutorial

* fix tune check

* address comments

* address comments
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
* debuggging

* cleanup and fix tutorial, zephyr and crt test

* fix crt test

* address comments
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
* fix test and cleanup

* fix tutorial doc

* fix verbose for tutorial

* fix tune check

* address comments

* address comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants