You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/01/22 23:39:36 UTC

[GitHub] [tvm] mdw-octoml opened a new pull request #7331: Update uTVM code to work with the nRF5340DK dev board.

mdw-octoml opened a new pull request #7331:
URL: https://github.com/apache/tvm/pull/7331


   This PR makes a few small changes to uTVM and its tests to support the nRF5340 dev board out of the box.
   
   


----------------------------------------------------------------
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.

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



[GitHub] [tvm] areusch commented on a change in pull request #7331: Update uTVM code to work with the nRF5340DK dev board.

Posted by GitBox <gi...@apache.org>.
areusch commented on a change in pull request #7331:
URL: https://github.com/apache/tvm/pull/7331#discussion_r562976220



##########
File path: python/tvm/micro/contrib/zephyr.py
##########
@@ -414,6 +417,16 @@ def flash(self, micro_binary):
         build_dir = os.path.dirname(
             micro_binary.abspath(micro_binary.labelled_files["cmake_cache"][0])
         )
+
+        # The nRF5340DK requires an additional `nrfjprog --recover` before each flash cycle.

Review comment:
       explain why and which error message this alleviates




----------------------------------------------------------------
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.

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



[GitHub] [tvm] mdw-octoml commented on pull request #7331: Update uTVM code to work with the nRF5340DK dev board.

Posted by GitBox <gi...@apache.org>.
mdw-octoml commented on pull request #7331:
URL: https://github.com/apache/tvm/pull/7331#issuecomment-765759262


   @areusch 


----------------------------------------------------------------
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.

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



[GitHub] [tvm] mdw-octoml commented on a change in pull request #7331: Update uTVM code to work with the nRF5340DK dev board.

Posted by GitBox <gi...@apache.org>.
mdw-octoml commented on a change in pull request #7331:
URL: https://github.com/apache/tvm/pull/7331#discussion_r564827199



##########
File path: python/tvm/target/target.py
##########
@@ -234,7 +234,10 @@ def micro(model="unknown", options=None):
     trans_table = {
         "host": [],
         "stm32f746xx": ["-mcpu=cortex-m7", "-march=armv7e-m"],
+        "nrf5340dk": ["-keys=arm_cpu", "-mcpu=cortex-m33"],

Review comment:
       @areusch Done - PTAL




----------------------------------------------------------------
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.

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



[GitHub] [tvm] areusch commented on a change in pull request #7331: Update uTVM code to work with the nRF5340DK dev board.

Posted by GitBox <gi...@apache.org>.
areusch commented on a change in pull request #7331:
URL: https://github.com/apache/tvm/pull/7331#discussion_r564727395



##########
File path: python/tvm/target/target.py
##########
@@ -234,7 +234,10 @@ def micro(model="unknown", options=None):
     trans_table = {
         "host": [],
         "stm32f746xx": ["-mcpu=cortex-m7", "-march=armv7e-m"],
+        "nrf5340dk": ["-keys=arm_cpu", "-mcpu=cortex-m33"],

Review comment:
       I think this was because we originally intended to enable ARM schedules based on `-march`. i think this was because i had read some documentation that `-march` was the proper way to specify ISA, but it turns out that this is just specific to x86 targets. For ARM targets, it seems `-mcpu` is actually canonical. So, we may need to improve our ISA parser to handle both.
   
   Actually I think `-keys` here is also unnecessary--my apologies. @mdw-octoml can you remove that? I believe it should get auto-added.




----------------------------------------------------------------
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.

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



[GitHub] [tvm] mdw-octoml commented on pull request #7331: Update uTVM code to work with the nRF5340DK dev board.

Posted by GitBox <gi...@apache.org>.
mdw-octoml commented on pull request #7331:
URL: https://github.com/apache/tvm/pull/7331#issuecomment-765793471


   PTAL


----------------------------------------------------------------
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.

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



[GitHub] [tvm] leandron commented on pull request #7331: Update uTVM code to work with the nRF5340DK dev board.

Posted by GitBox <gi...@apache.org>.
leandron commented on pull request #7331:
URL: https://github.com/apache/tvm/pull/7331#issuecomment-767570078


   cc @tom-gall and @gromero might want to have a look as well


----------------------------------------------------------------
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.

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



[GitHub] [tvm] mdw-octoml commented on a change in pull request #7331: Update uTVM code to work with the nRF5340DK dev board.

Posted by GitBox <gi...@apache.org>.
mdw-octoml commented on a change in pull request #7331:
URL: https://github.com/apache/tvm/pull/7331#discussion_r564724227



##########
File path: python/tvm/target/target.py
##########
@@ -234,7 +234,10 @@ def micro(model="unknown", options=None):
     trans_table = {
         "host": [],
         "stm32f746xx": ["-mcpu=cortex-m7", "-march=armv7e-m"],
+        "nrf5340dk": ["-keys=arm_cpu", "-mcpu=cortex-m33"],

Review comment:
       TBH, I have no idea. @areusch ?
   
   




----------------------------------------------------------------
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.

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



[GitHub] [tvm] tmoreau89 commented on a change in pull request #7331: Update uTVM code to work with the nRF5340DK dev board.

Posted by GitBox <gi...@apache.org>.
tmoreau89 commented on a change in pull request #7331:
URL: https://github.com/apache/tvm/pull/7331#discussion_r563003136



##########
File path: python/tvm/target/target.py
##########
@@ -234,7 +234,10 @@ def micro(model="unknown", options=None):
     trans_table = {
         "host": [],
         "stm32f746xx": ["-mcpu=cortex-m7", "-march=armv7e-m"],
+        "nrf5340dk": ["-keys=arm_cpu", "-mcpu=cortex-m33"],

Review comment:
       Nit: I'm curious as to why the STM has a `-march=...` field while the NRF has a `keys=...` target field. Could we keep it overall consistent? Thoughts on this @areusch 




----------------------------------------------------------------
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.

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



[GitHub] [tvm] jroesch merged pull request #7331: Update uTVM code to work with the nRF5340DK dev board.

Posted by GitBox <gi...@apache.org>.
jroesch merged pull request #7331:
URL: https://github.com/apache/tvm/pull/7331


   


----------------------------------------------------------------
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.

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



[GitHub] [tvm] mdw-octoml commented on a change in pull request #7331: Update uTVM code to work with the nRF5340DK dev board.

Posted by GitBox <gi...@apache.org>.
mdw-octoml commented on a change in pull request #7331:
URL: https://github.com/apache/tvm/pull/7331#discussion_r562980165



##########
File path: python/tvm/micro/contrib/zephyr.py
##########
@@ -414,6 +417,16 @@ def flash(self, micro_binary):
         build_dir = os.path.dirname(
             micro_binary.abspath(micro_binary.labelled_files["cmake_cache"][0])
         )
+
+        # The nRF5340DK requires an additional `nrfjprog --recover` before each flash cycle.

Review comment:
       Done.




----------------------------------------------------------------
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.

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