modules: cmsis: integrate CMSIS-NN

Integrate the CMSIS-NN libraries from the CMSIS 5.8.0 release.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
Jordan Yates 2021-12-21 13:52:47 +10:00 committed by Carles Cufí
parent 71a4c05120
commit d1ae54a022
3 changed files with 74 additions and 1 deletions

View file

@ -28,3 +28,11 @@ menuconfig CMSIS_DSP
if CMSIS_DSP
source "modules/Kconfig.cmsis_dsp"
endif
menuconfig CMSIS_NN
bool "CMSIS-NN Library Support"
depends on CPU_CORTEX_M && CMSIS_DSP
if CMSIS_NN
source "modules/Kconfig.cmsis_nn"
endif

65
modules/Kconfig.cmsis_nn Normal file
View file

@ -0,0 +1,65 @@
# Copyright (c) 2021, Commonwealth Scientific and Industrial Research
# Organisation (CSIRO) ABN 41 687 119 230.
# SPDX-License-Identifier: Apache-2.0
comment "CMSIS-NN Components"
config CMSIS_NN_ACTIVATION
bool "Activation"
help
This option enables the NN libraries for the activation layers
It can perform activation layers, including ReLU (Rectified
Linear Unit), sigmoid and tanh.
config CMSIS_NN_BASICMATH
bool "Basic Math for NN"
help
This option enables the NN libraries for the basic maths operations.
It adds functionality for element-wise add and multiplication functions.
config CMSIS_NN_CONCATENATION
bool "Concatenation"
help
This option enables the NN libraries for the concatenation layers.
config CMSIS_NN_CONVOLUTION
bool "Convolution"
imply CMSIS_NN_NNSUPPORT
help
Collection of convolution, depthwise convolution functions and
their variants. The convolution is implemented in 2 steps: im2col
and GEMM. GEMM is performed with CMSIS-DSP arm_mat_mult similar options.
config CMSIS_NN_FULLYCONNECTED
bool "Fully Connected"
imply CMSIS_NN_NNSUPPORT
help
Collection of fully-connected and matrix multiplication functions.
config CMSIS_NN_NNSUPPORT
bool "NN Support"
help
When off, its default behavior is all tables are included.
config CMSIS_NN_POOLING
bool "Pooling"
imply CMSIS_NN_NNSUPPORT
help
This option enables pooling layers, including max pooling
and average pooling.
config CMSIS_NN_RESHAPE
bool "Reshape"
help
This option enables the NN libraries for the reshape layers.
config CMSIS_NN_SOFTMAX
bool "Softmax"
help
This option enables the NN libraries for the softmax layers (exp2 based).
config CMSIS_NN_SVD
bool "SVD"
imply CMSIS_NN_NNSUPPORT
help
This option enabled the NN libraries for Single Value Decomposition Filter layers.

View file

@ -32,7 +32,7 @@ manifest:
revision: 094aeb41bb93e9199d24d665ee43e9e05d6d7b1c
path: modules/lib/civetweb
- name: cmsis
revision: b0612c97c1401feeb4160add6462c3627fe90fc7
revision: ed63b704bbfaceb71220557b658304c5ea3d5b88
path: modules/hal/cmsis
groups:
- hal