-
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
[Target] Fix empty target and host for autotvm task #7791
Conversation
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.
Seems to me that __setstate__
also has this issue? If you save the state with both target and target_host are None, then you will get the same problem in L202.
Thanks @comaniac for pointing that out. I have added check in this case. In order to prevent this issue, I would take a look at other occurrences as well and update in this PR. |
Sure. Please comment here once it's ready for reivew. |
Hi, I've checked all occurences and found other cases possible to reach the same error, e.g., the |
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.
Seems like we don't have a test case for check_and_update_host_consist
. Should we add one?
Hi Cody, I don't intend to add test for the function because this is a temporary function for migration to the new target system. It should be deprecated soon after target host deprecation and is not encouraged for any other usage. I have also added the assertion as per your good point. Please review and let me know any other advice, thanks! |
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.
Well...I don't quite agree on this point. Even this is just a temporary function, it is here now, and it is being used at more than 30 places in the current code base, which means a bug in this function affects 30+ places. Plus, the "tempoaray" could be one day or one to several months. It's not guaranteed that the final PR will be merged by when.
Would like to hear other's opinion.
cc @junrushao1994
Well, it does impact a lot of functions. I have added tests and fixed assertion warning as suggested. Please check, thanks! |
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
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.
Thanks for the fix!
In order to patch the empty target and host situation in Issue 7790.