You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "mehrdadh (via GitHub)" <gi...@apache.org> on 2023/01/26 23:54:06 UTC

[GitHub] [tvm] mehrdadh commented on a diff in pull request #13845: [microTVM] Update tutorials

mehrdadh commented on code in PR #13845:
URL: https://github.com/apache/tvm/pull/13845#discussion_r1088455446


##########
gallery/how_to/work_with_microtvm/micro_pytorch.py:
##########
@@ -93,11 +93,11 @@
 # would run on a physical microcontroller.
 #
 
-
 # Simulate a microcontroller on the host machine. Uses the main() from `src/runtime/crt/host/main.cc`
-# To use physical hardware, replace "host" with another physical micro target, e.g. `nrf52840`
-# or `mps2_an521`. See more more target examples in micro_train.py and micro_tflite.py tutorials.
-target = tvm.target.target.micro("host")
+# To use physical hardware, replace `board` with another physical micro target, e.g. `nrf5340dk_nrf5340_cpuapp`
+# or `mps2_an521` and change the platform type to Zephyr.
+# See more more target examples in micro_train.py and micro_tflite.py tutorials.

Review Comment:
   good catch, fixed it



##########
python/tvm/micro/testing/utils.py:
##########
@@ -47,10 +47,13 @@ def get_supported_boards(platform: str):
         return json.load(f)
 
 
-def get_target(platform: str, board: str) -> tvm.target.Target:
+def get_target(platform: str, board: str = None) -> tvm.target.Target:
     """Intentionally simple function for making Targets for microcontrollers.
     If you need more complex arguments, one should call target.micro directly. Note
     that almost all, but not all, supported microcontrollers are Arm-based."""
+    if platform == "crt":
+        return tvm.target.target.micro("host")
+

Review Comment:
   added, thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org