-
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
Replace RuntimeError in _lookup_task with deferred error. #8421
Conversation
This allows unknown tasks to be created (e.g., when parsing autotvm log files) but not invoked.
Hi @junrushao1994 and @jroesch - Mind taking a look? 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 @mdw-octoml for the contribution! The PR looks good to me!
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. Just put some thoughts to the error message. Feel free to take or reject.
Co-authored-by: Cody Yu <comaniac0422@gmail.com>
Thanks @comaniac - applied your suggestion! |
Thanks @mdw-octoml @junrushao1994 |
* Replace RuntimeError in _lookup_task with deferred error. This allows unknown tasks to be created (e.g., when parsing autotvm log files) but not invoked. * Format. * Update python/tvm/autotvm/task/task.py Co-authored-by: Cody Yu <comaniac0422@gmail.com> Co-authored-by: Matt Welsh <mdw@mdw.la> Co-authored-by: Cody Yu <comaniac0422@gmail.com>
* Replace RuntimeError in _lookup_task with deferred error. This allows unknown tasks to be created (e.g., when parsing autotvm log files) but not invoked. * Format. * Update python/tvm/autotvm/task/task.py Co-authored-by: Cody Yu <comaniac0422@gmail.com> Co-authored-by: Matt Welsh <mdw@mdw.la> Co-authored-by: Cody Yu <comaniac0422@gmail.com>
This allows unknown tasks to be created (e.g., when parsing autotvm log files) but not invoked.
This change is needed to allow one to read an autotvm log file created by a build of TVM with a different set of registered tasks than the build in which the script reading the log file is using. For example if one has a log file created by a TVM build with CUDA tasks, but reads the log file on a TVM build without CUDA enabled (e.g., running on a different OS without CUDA support).
The change should be safe in the sense that it raises a RuntimeError if the missing task is actually invoked, but the metadata associated with the task can still exist, allowing the log file to be parsed and analyzed.