-
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
[microTVM] Add tutorial on how to generate MLPerfTiny submissions #13783
Conversation
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
b344fed
to
2bcb15e
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.
thanks @mehrdadh !
# If you like to build the submission with CMSIS-NN, modify USE_CMSIS variable. | ||
# | ||
|
||
MODEL_URL = "https://github.com/mlcommons/tiny/raw/bceb91c5ad2e2deb295547d81505721d3a87d578/benchmark/training/visual_wake_words/trained_models/vww_96_int8.tflite" |
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 we include other models, since we reference them elsewhere?
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 think it would redundant here. We can make a micro/test api call that returns the address to the model.
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'm with @mehrdadh - I worry having multiple URLS might be confusing. Adding a micro API call would be a good way to clean this up in a future PR.
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.
Can this line (101) be pleased changed as follows?
MODEL_URL = os.environ.get("MODEL_URL", "https://github.com/mlcommons/tiny/raw/bceb91c5ad2e2deb295547d81505721d3a87d578/benchmark/training/visual_wake_words/trained_models/vww_96_int8.tflite")
This can give flexibility to the user to change the url without having to modify the code.
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.
@arjunsuresh Unfortunately that's not the only change that is required to use a different model in this tutorial. We could change this tutorial in a follow up PR to get all the model URL, name and index from test APIs in TVM
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.
This looks nice, thanks for writing it up! I've just got a few nits.
It would also be nice to add/copy over a unit test for MLPerf Tiny performance at some point, but that's a separate issue.
f"-DWORKSPACE_SIZE={workspace_size + 512}", | ||
f"-DTARGET_MODEL={MODEL_INDEX}", | ||
f"-DTH_MODEL_VERSION=EE_MODEL_VERSION_{MODEL_SHORT_NAME}01", | ||
f"-DMAX_DB_INPUT_SIZE={input_total_size}", |
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.
Would love for you to briefly state what these do.
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.
done.
if BOARD == "nrf5340dk_nrf5340_cpuapp": | ||
config_main_stack_size = 4000 | ||
elif BOARD == "nucleo_l4r5zi": | ||
config_main_stack_size = 4000 |
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.
Can we just set config_main_stack_size=4000
?
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.
done, added a note that they might need to adjust it based on their board
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!
# If you like to build the submission with CMSIS-NN, modify USE_CMSIS variable. | ||
# | ||
|
||
MODEL_URL = "https://github.com/mlcommons/tiny/raw/bceb91c5ad2e2deb295547d81505721d3a87d578/benchmark/training/visual_wake_words/trained_models/vww_96_int8.tflite" |
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'm with @mehrdadh - I worry having multiple URLS might be confusing. Adding a micro API call would be a good way to clean this up in a future PR.
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.
@mehrdadh Great tutorial! Nice you're playing with the EEMBC runner :-)
000b551
to
faf3b56
Compare
…ache#13783) This PR adds a tutorial on how to generate an MLPerftiny submission on Zephyr OS using microTVM.
This PR adds a tutorial on how to generate an MLPerftiny submission on Zephyr OS using microTVM.
cc @alanmacd @gromero @mkatanbaf