CMSIS DSP is not being included

Question/Issue:
I tried to deploy a model on a new device, with a EFR32MG22C224F512IM40-C which has a Cortex-M33, and I’ve realised that CMSIS-DSP and CMSIS-NN are not being included and I’d like to know how could I use them.
Thanks
Project ID:

Context/Use case:

Hi @JosuGaztelu,
Could you write what kind of deployment from the Studio you use (C++ Library, SLCC Component)?
Also, what toolchain/IDE do you use for compilation?
As a temporary workaround, try to set these three global defines:
EIDSP_USE_CMSIS_DSP=1
EIDSP_LOAD_CMSIS_DSP_SOURCES=1
EI_CLASSIFIER_TFLITE_ENABLE_CMSIS_NN=1

Best regards,
Mateusz

I used the C++ library, and I did define those three global defines, but what I dont understand is why using those defines or not the inference time is always the same. The toolchain is GNU ARM v10.3.1 and I’m using the Simplicity Studio v5 as IDE.

Best Regards,
Josu

OK, if you are using Simplicity Studio and GCC, then those defines should be added implicitly here:

We are enabling CMSIS-DSP and CMSIS-NN for all ARM-based targets to improve their performance.

Can eventually disable CMSIS-NN and CMSIS-DSP by explicitly defining:
EIDSP_USE_CMSIS_DSP=0
EI_CLASSIFIER_TFLITE_ENABLE_CMSIS_NN=0

Best regards,
Mateusz

I found out that it is due to the option of take log of spectrum, it causes to not have an impact between using or not CMSIS-DSP. I’m not sure if it is due to my processors specification so if anyone knows why could it be or could give me a hint I would be very grateful.

Thanks,
Josu

Hi @JosuGaztelu
What do you mean by:

due to the option of take log of spectrum

Is it possible to share your project source code? Or if you can build a minimal example where you are observing the same inference time regardless of the use of CMSIS-DSP and CMSIS-NN.

Best regards,
Mateusz

When selecting the spectral features as preprocessing block it has an otion to use logaritmic scale:
image
if this is selected CMSIS-DSP will not have any impact on DSP timing.
Should it have something to do maybe with the __ARM_FEATURE_DSP or any other define?

@JosuGaztelu can you post a few things to help us repro this?

For the deployment that runs faster, can you paste the serial output with the reported timings, along with model_variables.h?

And for the deployment the runs slower (with overlap fft frames enabled), can you post the same output and file?

Hi I dont know what i did, but now it seems to be working correctly with new project and CMSIS-DSP now works correctly, maybe it could be that in this case i defines the __ARM_FEATURE_DSP=1.
Thanks for the answers