Skip to content

[microTVM][tutorial] Add ENV variable to enable testing on physical hardware - #9993

Merged
masahi merged 6 commits into
apache:mainfrom
mehrdadh:tflite_tutorial_to_nightly
Jan 26, 2022
Merged

[microTVM][tutorial] Add ENV variable to enable testing on physical hardware#9993
masahi merged 6 commits into
apache:mainfrom
mehrdadh:tflite_tutorial_to_nightly

Conversation

@mehrdadh

@mehrdadh mehrdadh commented Jan 20, 2022

Copy link
Copy Markdown
Member

This PR changes micro_tflite.py to enable testing this tutorial on physical hardware.

@mehrdadh
mehrdadh requested a review from a team as a code owner January 20, 2022 01:30
@github-actions
github-actions Bot removed the request for review from a team January 21, 2022 00:32
@mehrdadh
mehrdadh force-pushed the tflite_tutorial_to_nightly branch from b12b480 to 68ac9e3 Compare January 21, 2022 00:33
@mehrdadh

Copy link
Copy Markdown
Member Author

cc @areusch @gromero

@gromero gromero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @mehrdadh. Thanks for the change. That's quite helpful indeed (not only for the nightly build :) ).

I've just would prefer to not construct and use the list comprehension and maybe use default for os.getenv() (please see the comment inline). Otherwise LGTM!

Comment thread gallery/how_to/work_with_microtvm/micro_tflite.py Outdated
Comment thread gallery/how_to/work_with_microtvm/micro_tflite.py Outdated
boards = json.load(f)

BOARD = os.getenv("TVM_MICRO_BOARD", default="nucleo_f746zg")
TARGET = tvm.target.target.micro(boards[BOARD]["model"])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@mehrdadh This is now out of use_physical_hw scope, so it will overwrite the previous TARGET value. Is that intentional?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

nope, that was incorrect. fixed it.
Thanks!

@gromero gromero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@mehrdadh Thanks for the v4. LGTM.

@masahi
masahi merged commit 884fee4 into apache:main Jan 26, 2022
@mehrdadh
mehrdadh deleted the tflite_tutorial_to_nightly branch January 26, 2022 16:22
sunggg pushed a commit to sunggg/tvm that referenced this pull request Jan 29, 2022
…ardware (apache#9993)

* Add env variable to micro tflite tutorial

* Address @gromero comments

* address @areusch comment

* fix scope

* trigger

* trigger
ylc pushed a commit to ylc/tvm that referenced this pull request Feb 16, 2022
…ardware (apache#9993)

* Add env variable to micro tflite tutorial

* Address @gromero comments

* address @areusch comment

* fix scope

* trigger

* trigger
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