Skip to content

Commit d1ae54a

Browse files
Jordan Yatescarlescufi
authored andcommitted
modules: cmsis: integrate CMSIS-NN
Integrate the CMSIS-NN libraries from the CMSIS 5.8.0 release. Signed-off-by: Jordan Yates <[email protected]>
1 parent 71a4c05 commit d1ae54a

File tree

3 files changed

+74
-1
lines changed

3 files changed

+74
-1
lines changed

modules/Kconfig.cmsis

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,11 @@ menuconfig CMSIS_DSP
2828
if CMSIS_DSP
2929
source "modules/Kconfig.cmsis_dsp"
3030
endif
31+
32+
menuconfig CMSIS_NN
33+
bool "CMSIS-NN Library Support"
34+
depends on CPU_CORTEX_M && CMSIS_DSP
35+
36+
if CMSIS_NN
37+
source "modules/Kconfig.cmsis_nn"
38+
endif

modules/Kconfig.cmsis_nn

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Copyright (c) 2021, Commonwealth Scientific and Industrial Research
2+
# Organisation (CSIRO) ABN 41 687 119 230.
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
comment "CMSIS-NN Components"
6+
7+
config CMSIS_NN_ACTIVATION
8+
bool "Activation"
9+
help
10+
This option enables the NN libraries for the activation layers
11+
It can perform activation layers, including ReLU (Rectified
12+
Linear Unit), sigmoid and tanh.
13+
14+
config CMSIS_NN_BASICMATH
15+
bool "Basic Math for NN"
16+
help
17+
This option enables the NN libraries for the basic maths operations.
18+
It adds functionality for element-wise add and multiplication functions.
19+
20+
config CMSIS_NN_CONCATENATION
21+
bool "Concatenation"
22+
help
23+
This option enables the NN libraries for the concatenation layers.
24+
25+
config CMSIS_NN_CONVOLUTION
26+
bool "Convolution"
27+
imply CMSIS_NN_NNSUPPORT
28+
help
29+
Collection of convolution, depthwise convolution functions and
30+
their variants. The convolution is implemented in 2 steps: im2col
31+
and GEMM. GEMM is performed with CMSIS-DSP arm_mat_mult similar options.
32+
33+
config CMSIS_NN_FULLYCONNECTED
34+
bool "Fully Connected"
35+
imply CMSIS_NN_NNSUPPORT
36+
help
37+
Collection of fully-connected and matrix multiplication functions.
38+
39+
config CMSIS_NN_NNSUPPORT
40+
bool "NN Support"
41+
help
42+
When off, its default behavior is all tables are included.
43+
44+
config CMSIS_NN_POOLING
45+
bool "Pooling"
46+
imply CMSIS_NN_NNSUPPORT
47+
help
48+
This option enables pooling layers, including max pooling
49+
and average pooling.
50+
51+
config CMSIS_NN_RESHAPE
52+
bool "Reshape"
53+
help
54+
This option enables the NN libraries for the reshape layers.
55+
56+
config CMSIS_NN_SOFTMAX
57+
bool "Softmax"
58+
help
59+
This option enables the NN libraries for the softmax layers (exp2 based).
60+
61+
config CMSIS_NN_SVD
62+
bool "SVD"
63+
imply CMSIS_NN_NNSUPPORT
64+
help
65+
This option enabled the NN libraries for Single Value Decomposition Filter layers.

west.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ manifest:
3232
revision: 094aeb41bb93e9199d24d665ee43e9e05d6d7b1c
3333
path: modules/lib/civetweb
3434
- name: cmsis
35-
revision: b0612c97c1401feeb4160add6462c3627fe90fc7
35+
revision: ed63b704bbfaceb71220557b658304c5ea3d5b88
3636
path: modules/hal/cmsis
3737
groups:
3838
- hal

0 commit comments

Comments
 (0)