You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "ashutosh-arm (via GitHub)" <gi...@apache.org> on 2023/12/29 13:47:43 UTC
[I] [Bug][CMSIS-NN] Align buffer size APIs between TVM and CMSIS-NN [tvm]
ashutosh-arm opened a new issue, #16298:
URL: https://github.com/apache/tvm/issues/16298
### Context
TVM is built without CMSIS-NN sources. CMSIS-NN APIs emitted from codegen require buffer sizes. These buffer sizes are calculated using natively implemented buffer size APIs within TVM. However, new CMSIS-NN APIs were introduced with the CMSIS-NN v4.1.0. In order to maintain these APIs better, TVM can reuse these APIs from CMSIS-NN sources directly. This means natively implemented APIs can be removed from TVM sources.
#### Reference
CMSIS-NN PR that introduced buffer size APIs.
https://github.com/ARM-software/CMSIS-NN/pull/40
Native TVM implementation that can be removed.
https://github.com/apache/tvm/blob/main/src/relay/backend/contrib/cmsisnn/buffer_size.cc
Usage of buffer sizes in TVM.
https://github.com/apache/tvm/blob/506eff23b034cfd88dda44cf5040ab8b40683155/src/relay/backend/contrib/cmsisnn/relay_to_tir.cc#L99
Implementation choices:
1. TVM can introduce CMSIS-NN under the third party tools.
2. Only buffer size APIs from CMSIS-NN can be copied under CMSIS-NN sources in TVM.
3. Install CMSIS-NN sources as part of docker installation: https://github.com/apache/tvm/blob/main/docker/install/ubuntu_install_cmsis.sh
### Advantage
1. Reduced maintenance of CMSIS-NN code in TVM.
2. Less runtime errors due to misalignment of buffer sizes.
### Environment
TVM 0.14.0
### Steps to reproduce
Any of the following tests can be used.
https://github.com/apache/tvm/blob/main/tests/cpp/relay/backend/contrib/cmsisnn/buffer_size_test.cc
--
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
Re: [I] [Bug][CMSIS-NN] Align buffer size APIs between TVM and CMSIS-NN [tvm]
Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen closed issue #16298: [Bug][CMSIS-NN] Align buffer size APIs between TVM and CMSIS-NN
URL: https://github.com/apache/tvm/issues/16298
--
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