-
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 tutorial #9633
Tvmc python tutorial #9633
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.
Thanks for this tutorial @CircleSpin! I had a first read and just spotted some minor changes in upper case acronyms and some sections that need a bit of more context to be added.
I'm happy with the sequence of steps you propose in this tutorial. I suggest we just adapt them using a real case that the user can reproduce on their own machine.
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. Looks like you hit a flaky test?
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 fixes!
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.
Should this tutorial supercede the other Python tutorial? I'm worried that people might get confused with two ways of doing things. If it shouldn't, we should clearly explain why there are two ways and what the intended outcome of each method is.
################################################################################ | ||
# Step 2: Compile | ||
# ---------------- | ||
# Now that our model is in relay, our next step is to compile it to a desired |
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.
Thinking out loud here, for documentation we should starting thinking about a style guide for named parts of TVM. Should it be Relay
or relay
? Our choice should be consistently applied throughout the project.
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.
I've capitalized the instances here to be "Relay".
Hi @hogepodge, By all means if there's another ordering of the tutorials you prefer let's go with that. This tutorial seems to do the same thing as this one https://tvm.apache.org/docs/tutorial/autotvm_relay_x86.html#sphx-glr-tutorial-autotvm-relay-x86-py but instead uses the Tvmc python API. This API shares the same backend as the command line tool and is intended to be simple and new-user friendly. |
d752387
to
51475dd
Compare
Changed the location of this doc to be in the tutorial section after tvmc command line tutorial and before the autotvm python tutorial. |
@CircleSpin just a friendly ping on this one. Can we rebase and re-run CI? Context: we got a question in the forum, that could be helped by this tutorial, then I remembered about this PR. |
Co-authored-by: Leandro Nunes <leandro.nunes@arm.com>
Co-authored-by: Leandro Nunes <leandro.nunes@arm.com>
Co-authored-by: Leandro Nunes <leandro.nunes@arm.com>
Co-authored-by: Leandro Nunes <leandro.nunes@arm.com>
Co-authored-by: Leandro Nunes <leandro.nunes@arm.com>
Co-authored-by: Leandro Nunes <leandro.nunes@arm.com>
Co-authored-by: Leandro Nunes <leandro.nunes@arm.com>
2b87c16
to
cbf6cdc
Compare
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.
Aside from the redirect, we should merge this.
@@ -255,6 +255,7 @@ def git_describe_version(original_version): | |||
"introduction.py", | |||
"install.py", | |||
"tvmc_command_line_driver.py", | |||
"tvmc_python.py", |
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.
+1 to this, thanks!
[ | ||
"tutorials/get_started/tvmc_python.html", | ||
"../../tutorial/tvmc_python.html", | ||
], |
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.
Since this a new page, a redirect isn't necessary.
@CircleSpin will you follow up with Chris's suggestion on redirect? I am going to merge as is |
The redirect does no harm, and this PR has been sitting for too long. Thanks for merging @jroesch and especially thanks to @CircleSpin for writing up this doc. |
* finish rpc and shape_dict in tut * added more to rpc * tutorial edits * added tutorial to docs in howto * accidentally had two copies of tutorial * Update gallery/how_to/use_tvms_python_api/tvmc_python.py Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * Update gallery/how_to/use_tvms_python_api/tvmc_python.py Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * Update gallery/how_to/use_tvms_python_api/tvmc_python.py Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * Update gallery/how_to/use_tvms_python_api/tvmc_python.py Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * Apply suggestions from code review Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * Update gallery/how_to/use_tvms_python_api/tvmc_python.py Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * Update gallery/how_to/use_tvms_python_api/tvmc_python.py Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * added Leandro's suggestions * added example model at top * added example model, blacked it * trying to get docs to build * underline too short for title * forgot Jetson info, added Chris H comments * reformatting text * black * hitting code block issue, trying to debug * added spaces after the python codeblock * black * changing formatting * touching up more edits' * more touchups * changed location of file to tutorial section * changing doc location * broke the order of the docs somehow * fixed it yayy * added additional indentation * black'd Co-authored-by: CircleSpin <jocelyn@pop-os.localdomain> Co-authored-by: Leandro Nunes <leandro.nunes@arm.com>
* finish rpc and shape_dict in tut * added more to rpc * tutorial edits * added tutorial to docs in howto * accidentally had two copies of tutorial * Update gallery/how_to/use_tvms_python_api/tvmc_python.py Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * Update gallery/how_to/use_tvms_python_api/tvmc_python.py Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * Update gallery/how_to/use_tvms_python_api/tvmc_python.py Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * Update gallery/how_to/use_tvms_python_api/tvmc_python.py Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * Apply suggestions from code review Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * Update gallery/how_to/use_tvms_python_api/tvmc_python.py Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * Update gallery/how_to/use_tvms_python_api/tvmc_python.py Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * added Leandro's suggestions * added example model at top * added example model, blacked it * trying to get docs to build * underline too short for title * forgot Jetson info, added Chris H comments * reformatting text * black * hitting code block issue, trying to debug * added spaces after the python codeblock * black * changing formatting * touching up more edits' * more touchups * changed location of file to tutorial section * changing doc location * broke the order of the docs somehow * fixed it yayy * added additional indentation * black'd Co-authored-by: CircleSpin <jocelyn@pop-os.localdomain> Co-authored-by: Leandro Nunes <leandro.nunes@arm.com>
* finish rpc and shape_dict in tut * added more to rpc * tutorial edits * added tutorial to docs in howto * accidentally had two copies of tutorial * Update gallery/how_to/use_tvms_python_api/tvmc_python.py Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * Update gallery/how_to/use_tvms_python_api/tvmc_python.py Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * Update gallery/how_to/use_tvms_python_api/tvmc_python.py Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * Update gallery/how_to/use_tvms_python_api/tvmc_python.py Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * Apply suggestions from code review Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * Update gallery/how_to/use_tvms_python_api/tvmc_python.py Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * Update gallery/how_to/use_tvms_python_api/tvmc_python.py Co-authored-by: Leandro Nunes <leandro.nunes@arm.com> * added Leandro's suggestions * added example model at top * added example model, blacked it * trying to get docs to build * underline too short for title * forgot Jetson info, added Chris H comments * reformatting text * black * hitting code block issue, trying to debug * added spaces after the python codeblock * black * changing formatting * touching up more edits' * more touchups * changed location of file to tutorial section * changing doc location * broke the order of the docs somehow * fixed it yayy * added additional indentation * black'd Co-authored-by: CircleSpin <jocelyn@pop-os.localdomain> Co-authored-by: Leandro Nunes <leandro.nunes@arm.com>
Finally putting up the doc :')
Let me know of thoughts/feedback.
@mbrookhart @hogepodge @jwfromm