-
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
[TVMC] Python Scripting Init Files #7698
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.
LGTM!
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.
Is the use case here that TVMC is used as an API within python scripts? it look OK to me, since it is part of TVM.
Can we think of a few test cases to add, to cover this new entry-point for tvmc as API?
cc @comaniac
@leandron yeah we think TVMC has an excellent set of utilities to make it a simplified python API for new users, kind of like keras. You did an awesome job packing tons of functionality into a few key function calls, but some of them need some small changes to better accommodate access from Python. @CircleSpin is working on making these changes. |
I've modified the test files so that they use new the importing syntax. Does this look good to you @leandron ? |
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
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 @CircleSpin
@merrymercy this PR is failing with this error message |
Just a guess. Is that due to circular dependency? |
Thanks @CircleSpin @leandron and @comaniac. This is now merged. |
* add to init files for clean tvmc python * black reformat init.py * adjust tests to new imports * black test files * tell lint ignore defined-builtin error for tvmc compile * add colon to match lint syntax * change import so must use tvm.driver.tvmc instead of tvm.tvmc Co-authored-by: Jocelyn <jocelyn@pop-os.localdomain>
* add to init files for clean tvmc python * black reformat init.py * adjust tests to new imports * black test files * tell lint ignore defined-builtin error for tvmc compile * add colon to match lint syntax * change import so must use tvm.driver.tvmc instead of tvm.tvmc Co-authored-by: Jocelyn <jocelyn@pop-os.localdomain>
This PR adds to two init files to make tvmc cleaner for running python scripts. For example, instead of running tvmc.runner.run_module() you can now run tvmc.run()