Skip to content

Commit f06b9b0

Browse files
committed
modules: cmsis-nn: add *_s4.c sources
Add new sources for 4 bit function variants to build system. Signed-off-by: Jordan Yates <[email protected]>
1 parent 16446ca commit f06b9b0

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

modules/cmsis-nn/CMakeLists.txt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,24 @@ if(CONFIG_CMSIS_NN)
3333
endif()
3434

3535
if(CONFIG_CMSIS_NN_CONVOLUTION)
36-
file(GLOB SRC "${CMSIS_NN_DIR}/Source/ConvolutionFunctions/*_s8*.c")
36+
file(GLOB SRC_S4 "${CMSIS_NN_DIR}/Source/ConvolutionFunctions/*_s4*.c")
37+
file(GLOB SRC_S8 "${CMSIS_NN_DIR}/Source/ConvolutionFunctions/*_s8*.c")
3738
file(GLOB SRC_S16 "${CMSIS_NN_DIR}/Source/ConvolutionFunctions/*_s16*.c")
38-
zephyr_library_sources(${SRC} ${SRC_S16})
39+
zephyr_library_sources(${SRC_S4} ${SRC_S8} ${SRC_S16})
3940
endif()
4041

4142
if(CONFIG_CMSIS_NN_FULLYCONNECTED)
42-
file(GLOB SRC "${CMSIS_NN_DIR}/Source/FullyConnectedFunctions/*_s8.c")
43+
file(GLOB SRC_S4 "${CMSIS_NN_DIR}/Source/FullyConnectedFunctions/*_s4.c")
44+
file(GLOB SRC_S8 "${CMSIS_NN_DIR}/Source/FullyConnectedFunctions/*_s8.c")
4345
file(GLOB SRC_S16 "${CMSIS_NN_DIR}/Source/FullyConnectedFunctions/*_s16*.c")
44-
zephyr_library_sources(${SRC} ${SRC_S16})
46+
zephyr_library_sources(${SRC_S4} ${SRC_S8} ${SRC_S16})
4547
endif()
4648

4749
if(CONFIG_CMSIS_NN_NNSUPPORT)
48-
file(GLOB SRC "${CMSIS_NN_DIR}/Source/NNSupportFunctions/*_s8*.c")
50+
file(GLOB SRC_S4 "${CMSIS_NN_DIR}/Source/NNSupportFunctions/*_s4*.c")
51+
file(GLOB SRC_S8 "${CMSIS_NN_DIR}/Source/NNSupportFunctions/*_s8*.c")
4952
file(GLOB SRC_S16 "${CMSIS_NN_DIR}/Source/NNSupportFunctions/*_s16*.c")
50-
zephyr_library_sources(${SRC} ${SRC_S16}
53+
zephyr_library_sources(${SRC_S4} ${SRC_S8} ${SRC_S16}
5154
${CMSIS_NN_DIR}/Source/NNSupportFunctions/arm_nntables.c
5255
${CMSIS_NN_DIR}/Source/NNSupportFunctions/arm_q7_to_q15_with_offset.c
5356
${CMSIS_NN_DIR}/Source/NNSupportFunctions/arm_s8_to_s16_unordered_with_offset.c)

0 commit comments

Comments
 (0)