Skip to content
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] Custom IDE Tutorial #13857

Merged
merged 8 commits into from
Mar 13, 2023
Merged

Conversation

mkatanbaf
Copy link
Contributor

Adds "Bring microTVM to your own development environment" to microTVM tutorials. This tutorial describes the steps required to integrate a model compiled with microTVM into a custom development environment. We use STM32Cube IDE, the VWW model and the nucleo_l4r5zi board.

@tvm-bot
Copy link
Collaborator

tvm-bot commented Jan 27, 2023

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

Copy link
Member

@mehrdadh mehrdadh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added some initial comments

gallery/how_to/work_with_microtvm/micro_custom_ide.py Outdated Show resolved Hide resolved
gallery/how_to/work_with_microtvm/micro_custom_ide.py Outdated Show resolved Hide resolved
gallery/how_to/work_with_microtvm/micro_custom_ide.py Outdated Show resolved Hide resolved
gallery/how_to/work_with_microtvm/micro_custom_ide.py Outdated Show resolved Hide resolved
gallery/how_to/work_with_microtvm/micro_custom_ide.py Outdated Show resolved Hide resolved
gallery/how_to/work_with_microtvm/micro_custom_ide.py Outdated Show resolved Hide resolved
@mkatanbaf mkatanbaf force-pushed the custom_ide_tutorial branch from a34f404 to 7e3eae4 Compare March 6, 2023 21:20
@mkatanbaf mkatanbaf marked this pull request as ready for review March 10, 2023 17:46
@mkatanbaf mkatanbaf requested a review from mehrdadh March 10, 2023 17:48
from PIL import Image
import tarfile

import tvm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to link to or note above that you also need TVM python package installed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think tvm install would show up by default in google collab version?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, I guess that needs to be TVM built with USE_MICRO enabled

Copy link
Contributor

@alanmacd alanmacd Mar 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mehrdadh right, but what if someone wants to run locally?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a link to tvm documentation page for installing tvm.

Copy link
Member

@mehrdadh mehrdadh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @mkatanbaf and @alanmacd!

#
# * Open the project Properties. (by right clicking on the project name and selecting "Properties" or by selecting Project -> Properties from the menu bar).
# * Select C/C++ General -> Paths and Symbols. Select the Source Location tab.
# * If you extract the model inside the project folder on your disk, click "Add Folder" and select the "model" folder. (You might need to right click on the project name and select "Refresh" before it appears.)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't get the "Add Folder" method to work on MacOS, even after restarting the IDE.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why it didn't work for you. Please make sure the extracted "model" folder is inside your project folder, and refresh the project explorer.

Copy link
Contributor

@alanmacd alanmacd Mar 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea doing the "Refresh" made it show up this time.

@alanmacd
Copy link
Contributor

Great tutorial @mkatanbaf, I left a few comments and was able to get it up and running on MacOS:

Person not detected, inference time = 297 ms
Person detected, inference time = 297 ms

@mkatanbaf
Copy link
Contributor Author

Thanks @alanmacd for the detailed review

Copy link
Contributor

@alanmacd alanmacd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, great tutorial!

@mehrdadh mehrdadh merged commit eecc02a into apache:main Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants