diff --git a/modules/cmsis-nn/CMakeLists.txt b/modules/cmsis-nn/CMakeLists.txt index 2eacfd0d31a..0fdf3db9675 100644 --- a/modules/cmsis-nn/CMakeLists.txt +++ b/modules/cmsis-nn/CMakeLists.txt @@ -90,4 +90,9 @@ if(CONFIG_CMSIS_NN) zephyr_library_sources(${SRC}) endif() + if(CONFIG_CMSIS_NN_PAD) + file(GLOB SRC "${CMSIS_NN_DIR}/Source/PadFunctions/*_s8.c") + zephyr_library_sources(${SRC}) + endif() + endif() diff --git a/modules/cmsis-nn/Kconfig b/modules/cmsis-nn/Kconfig index 419d3f3a75d..dd5395f92ef 100644 --- a/modules/cmsis-nn/Kconfig +++ b/modules/cmsis-nn/Kconfig @@ -78,6 +78,11 @@ config CMSIS_NN_LSTM help This option enables the NN libraries for Long Short-Term Memory. +config CMSIS_NN_PAD + bool "Pad" + help + This option enables the NN libraries for the pad layers. + config CMSIS_NN_TRANSPOSE bool "Transpose" help diff --git a/modules/tflite-micro/Kconfig b/modules/tflite-micro/Kconfig index 887c965759a..99a49d6a633 100644 --- a/modules/tflite-micro/Kconfig +++ b/modules/tflite-micro/Kconfig @@ -29,6 +29,7 @@ config TENSORFLOW_LITE_MICRO_CMSIS_NN_KERNELS select CMSIS_NN_SVD select CMSIS_NN_LSTM select CMSIS_NN_TRANSPOSE + select CMSIS_NN_PAD help This option adds support for CMSIS-NN optimized kernels when using TensorFlow Lite Micro.