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/04/15 00:13:52 UTC

[GitHub] [tvm] areusch opened a new pull request #7853: Fix Zephyr flashing on physical hardware, busted in #7813

areusch opened a new pull request #7853:
URL: https://github.com/apache/tvm/pull/7853


   @gromero looks like I missed this in reviewing your change, and unfortunately no way to test this in CI at main right now.


-- 
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] gromero commented on pull request #7853: Fix Zephyr flashing on physical hardware, busted in #7813

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


   > So, what happened here was that I've indeed tested an early version of my change with STM32 disco board, but then I did additional changes and checked it again, but got the following error:
   > 
   > ```
   > Model Version: 3
   > Cannot find config for target=c -keys=cpu -link-params=0 -march=armv7e-m -mcpu=cortex-m7 -model=stm32f746xx -runtime=c -system-lib=1, workload=('dense_pack.x86', ('TENSOR', (1, 16), 'float32'), ('TENSOR', (1, 16), 'float32'), None, 'float32'). A fallback configuration is used, which may bring great performance regression.
   > Cannot find config for target=c -keys=cpu -link-params=0 -march=armv7e-m -mcpu=cortex-m7 -model=stm32f746xx -runtime=c -system-lib=1, workload=('dense_pack.x86', ('TENSOR', (1, 16), 'float32'), ('TENSOR', (16, 16), 'float32'), None, 'float32'). A fallback configuration is used, which may bring great performance regression.
   > Cannot find config for target=c -keys=cpu -link-params=0 -march=armv7e-m -mcpu=cortex-m7 -model=stm32f746xx -runtime=c -system-lib=1, workload=('dense_pack.x86', ('TENSOR', (1, 1), 'float32'), ('TENSOR', (16, 1), 'float32'), None, 'float32'). A fallback configuration is used, which may bring great performance regression.
   > ./micro_tflite_disco_head.py:202: DeprecationWarning: legacy graph executor behavior of producing json / lib / params will be removed in the next release. Please see documents of tvm.contrib.graph_executor.GraphModule for the  new recommended usage.
   >   graph, c_mod, c_params = relay.build(mod, target=TARGET, params=params)
   > Including boilerplate (Zephyr base): /home/gromero/zephyrproject/zephyr/cmake/app/boilerplate.cmake
   > In file included from <command-line>:
   > /home/gromero/zephyrproject/zephyr/boards/arm/stm32f746g_disco/stm32f746g_disco.dts:9:10: fatal error: st/f7/stm32f746nghx-pinctrl.dtsi: No such file or directory
   >     9 | #include <st/f7/stm32f746nghx-pinctrl.dtsi>
   >       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   > compilation terminated.
   > CMake Error at /home/gromero/zephyrproject/zephyr/cmake/dts.cmake:156 (message):
   >   command failed with return code: 1
   > Call Stack (most recent call first):
   >   /home/gromero/zephyrproject/zephyr/cmake/app/boilerplate.cmake:535 (include)
   >   /home/gromero/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
   >   /home/gromero/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
   >   CMakeLists.txt:3 (find_package)
   > 
   > 
   > Traceback (most recent call last):
   >   File "./micro_tflite_disco_head.py", line 242, in <module>
   >     micro_binary = tvm.micro.build_static_runtime(
   >   File "/home/gromero/git/tvm/python/tvm/micro/build.py", line 240, in build_static_runtime
   >     libs.append(compiler.library(lib_build_dir, lib_srcs, compiler_options["lib_opts"]))
   >   File "/home/gromero/git/tvm/python/tvm/micro/contrib/zephyr.py", line 209, in library
   >     self._subprocess_env.run(
   >   File "/home/gromero/git/tvm/python/tvm/micro/contrib/zephyr.py", line 60, in run
   >     return subprocess.check_output(cmd, env=env, **kw, universal_newlines=True)
   >   File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
   >     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
   >   File "/usr/lib/python3.8/subprocess.py", line 512, in run
   >     raise CalledProcessError(retcode, process.args,
   > subprocess.CalledProcessError: Command '['cmake', '..', '-DBOARD=stm32f746g_disco', '-DEXTRA_CFLAGS=-Wno-error=incompatible-pointer-types -Wno-unused-variable -fno-builtin', "-DEXTRA_CXXFLAGS=-std=c++11 -Wall -Werror '-DDMLC_USE_LOGGING_LIBRARY=<tvm/runtime/logging.h>' -Wno-unused-variable", '-DEXTRA_LDFLAGS=-std=c++11']' returned non-zero exit status 1.
   > ```
   
   For the records, that error happens because on Zephyr 2.5.0 the `*-pinctrl.dtsi` files, like `stm32f746nghx-pinctrl.dtsi`, moved to a different location under HAL files, so running `$ west update` resolved it.
   
   


-- 
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 pull request #7853: Fix Zephyr flashing on physical hardware, busted in #7813

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


   @gromero glad you resolved it. did you need to do this with the reference VM, or just on your 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] gromero commented on pull request #7853: Fix Zephyr flashing on physical hardware, busted in #7813

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


   @areusch oh okay. Thanks for fixing it!
   
   So, what happened here was that I've indeed tested an early version of my change with STM32 disco board, but then I did additional changes and checked it again, but got the following error:
   
   ```File /home/gromero/.tvm_test_data/data/sine_model.tflite exists, skip.
   Model Version: 3
   Cannot find config for target=c -keys=cpu -link-params=0 -march=armv7e-m -mcpu=cortex-m7 -model=stm32f746xx -runtime=c -system-lib=1, workload=('dense_pack.x86', ('TENSOR', (1, 16), 'float32'), ('TENSOR', (1, 16), 'float32'), None, 'float32'). A fallback configuration is used, which may bring great performance regression.
   Cannot find config for target=c -keys=cpu -link-params=0 -march=armv7e-m -mcpu=cortex-m7 -model=stm32f746xx -runtime=c -system-lib=1, workload=('dense_pack.x86', ('TENSOR', (1, 16), 'float32'), ('TENSOR', (16, 16), 'float32'), None, 'float32'). A fallback configuration is used, which may bring great performance regression.
   Cannot find config for target=c -keys=cpu -link-params=0 -march=armv7e-m -mcpu=cortex-m7 -model=stm32f746xx -runtime=c -system-lib=1, workload=('dense_pack.x86', ('TENSOR', (1, 1), 'float32'), ('TENSOR', (16, 1), 'float32'), None, 'float32'). A fallback configuration is used, which may bring great performance regression.
   ./micro_tflite_disco_head.py:202: DeprecationWarning: legacy graph executor behavior of producing json / lib / params will be removed in the next release. Please see documents of tvm.contrib.graph_executor.GraphModule for the  new recommended usage.
     graph, c_mod, c_params = relay.build(mod, target=TARGET, params=params)
   Including boilerplate (Zephyr base): /home/gromero/zephyrproject/zephyr/cmake/app/boilerplate.cmake
   In file included from <command-line>:
   /home/gromero/zephyrproject/zephyr/boards/arm/stm32f746g_disco/stm32f746g_disco.dts:9:10: fatal error: st/f7/stm32f746nghx-pinctrl.dtsi: No such file or directory
       9 | #include <st/f7/stm32f746nghx-pinctrl.dtsi>
         |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   compilation terminated.
   CMake Error at /home/gromero/zephyrproject/zephyr/cmake/dts.cmake:156 (message):
     command failed with return code: 1
   Call Stack (most recent call first):
     /home/gromero/zephyrproject/zephyr/cmake/app/boilerplate.cmake:535 (include)
     /home/gromero/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
     /home/gromero/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
     CMakeLists.txt:3 (find_package)
   
   
   Traceback (most recent call last):
     File "./micro_tflite_disco_head.py", line 242, in <module>
       micro_binary = tvm.micro.build_static_runtime(
     File "/home/gromero/git/tvm/python/tvm/micro/build.py", line 240, in build_static_runtime
       libs.append(compiler.library(lib_build_dir, lib_srcs, compiler_options["lib_opts"]))
     File "/home/gromero/git/tvm/python/tvm/micro/contrib/zephyr.py", line 209, in library
       self._subprocess_env.run(
     File "/home/gromero/git/tvm/python/tvm/micro/contrib/zephyr.py", line 60, in run
       return subprocess.check_output(cmd, env=env, **kw, universal_newlines=True)
     File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
       return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
     File "/usr/lib/python3.8/subprocess.py", line 512, in run
       raise CalledProcessError(retcode, process.args,
   subprocess.CalledProcessError: Command '['cmake', '..', '-DBOARD=stm32f746g_disco', '-DEXTRA_CFLAGS=-Wno-error=incompatible-pointer-types -Wno-unused-variable -fno-builtin', "-DEXTRA_CXXFLAGS=-std=c++11 -Wall -Werror '-DDMLC_USE_LOGGING_LIBRARY=<tvm/runtime/logging.h>' -Wno-unused-variable", '-DEXTRA_LDFLAGS=-std=c++11']' returned non-zero exit status 1.
   ```
   
   Skimming through it I attributed it to a Zephyr 2.5.0 change which I stashed to look later and then kind forgot to return to it, focusing on the CI issues I had on the submitting the 7813 PR, sorry about that.
   
   I'm wondering on which board you hit the regression first. Was that a disco board or the Nordic (nRF)?
   
   Anyway, I need to think of some way to avoid that kind of regression since it's happening too often recently...


-- 
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] tqchen merged pull request #7853: Fix Zephyr flashing on physical hardware, busted in #7813

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


   


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