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 2022/05/20 15:41:19 UTC

[GitHub] [tvm] SebastianBoblestETAS opened a new issue, #11394: [Bug] Problem with AllocateConstNodes in CMSIS-NN code

SebastianBoblestETAS opened a new issue, #11394:
URL: https://github.com/apache/tvm/issues/11394

   I already reported this issue here:
   https://discuss.tvm.apache.org/t/problem-with-allocateconstnodes-in-cmsis-nn-code/12806
   
   It seems that AllocateConstNodes can be overwritten in models that contain both CMSIS-NN functions and functions generated by TVM. Concretely, tvmgen_conv1d_ave_fused_cast_subtract_clip_cast in conv1d_ave_lib1.c uses constant_0 that is defined as
   static const int32_t __attribute__((section(".rodata.tvm"), aligned(16))) constant_0[1] = {
       -0x00000080
   };
   in conv1d_ave_lib1.c.
   At the same time tvmgen_conv1d_ave_cmsis_nn_main_0 is also called with constant_0 as "filter" argument, but the filter_dims are
     cmsis_nn_dims filter_dims = {8,1,2,3}; in conv1d_ave_lib2.c
   
   I use a local installation of TVM on Linux that is only a few hours old.
   I attached a zip file that contains the following:
   * A txt file with the tvmc command that I used, including the command line output from tvm
   * The tflite model
   * The corresponding keras model in h5 format
   * the python script that I used to quantize the keras model
   * The tar file that tvmc produced with the relevant files in codegen/host/src
   
   I hope I did not confuse anything here or make a mistake in the invocation of tvmc.
   
   Best, 
   Sebastian
   @grant-arm @Mousius @manupa-arm @ashutosh-arm 
   [cmsis_report.zip](https://github.com/apache/tvm/files/8741594/cmsis_report.zip)
   
   


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

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


[GitHub] [tvm] grant-arm commented on issue #11394: [Bug] Problem with AllocateConstNodes in CMSIS-NN code

Posted by GitBox <gi...@apache.org>.
grant-arm commented on issue #11394:
URL: https://github.com/apache/tvm/issues/11394#issuecomment-1133054411

   Thanks for raising this @SebastianBoblestETAS. We will take a look at 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.

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

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


[GitHub] [tvm] grant-arm commented on issue #11394: [Bug] Problem with AllocateConstNodes in CMSIS-NN code

Posted by GitBox <gi...@apache.org>.
grant-arm commented on issue #11394:
URL: https://github.com/apache/tvm/issues/11394#issuecomment-1134676984

   Hi @SebastianBoblestETAS , I've been able to reproduce your issue locally.
   It does appear to be a legitimate issue and not a mistake in the way you're invoking `tvmc`.
   We'll try to get a fix up as soon as we can.


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


[GitHub] [tvm] SebastianBoblestETAS commented on issue #11394: [Bug] Problem with AllocateConstNodes in CMSIS-NN code

Posted by GitBox <gi...@apache.org>.
SebastianBoblestETAS commented on issue #11394:
URL: https://github.com/apache/tvm/issues/11394#issuecomment-1137335039

   We looked into this a bit more. So I cannot precisely say why this bug occurs. But at least I found a hint:
   In models without CMSIS calls the function tvmgen_default___tvm_main__ does not have AllocateConstNodes. With CMSIS support however, the CMSIS parameters are in tvmgen_default___tvm_main__. Somehow they are numbered separetely from the other AllocateConstNodes.
   @vdkhoi @UlrikHjort-Bosch


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