Error INFO:HW RFFT failed, falling back to SW

Hello, I am using the nrf52 from Nordic and building my impulse for edge computing. When I run my code with the C++ library compiled from the Edge Impulse platform, it displays the following log. However, I believe the model is functioning correctly. Should I be concerned about the error log?

INFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWINFO: HW RFFT failed, falling back to SWrun_classifier returned: 0
Predictions (DSP: 117 ms., Classification: 8 ms., Anomaly: 1 ms.): 
    small_angle: 0.00000
    standard: 0.00000
    static: 0.99609
    stay: 0.00000
    anomaly score: -0.2

Hi @ekidsalan123

It’s not an error, just an INFO log and you are right, the model is running correctly , you can check in this file inferencing-sdk-cpp/dsp/numpy.hpp at master · edgeimpulse/inferencing-sdk-cpp · GitHub when the info message is printed.

Basically, we try to run FFT using CMSIS DSP if hw and parameters allows it, otherwise we run FFT using SW.

regards,
fv

1 Like

I am teaching a course at Carnegie Mellon University, and some students are getting the “RFFT failed” error, but not all. All students use the same platform, the Arduino Nano 33 BLE sense board. The result of such an error is that the delay for the DSP block is about 10 times higher for the students who get the error than those who don’t.
Can you help either fix this error or tell us how to fix it?
Thanks,
–ziad

Hi @z4ziad , this is not an error in that it’s expected behavior, however the SDK is trying to bring something to your student’s attention. ARM’s accelerated DSP library only supports power of 2 FFT sizes (32, 64, etc). If your DSP parameters use a non power of 2 size (like 20), then we fall back to a software implementation that is slower, but more flexible.

I can see that this message is a bit misleading so I’ll try to clean it up and make it more informative sometime soon.

And if it’s not clear which of your DSP settings are triggering a non power of 2 FFT, simply post your settings here and I’ll give you some guidance.

1 Like

Okay, after digging into the library codes, I found the cause for the “HW RFFT fail” error after deploying to the Nano 33. It seems that ARM changed the CMSIS (Common Microcontroller Software Interface Standard) library to run DSP acceleration in hardware only for FFT lengths of 32 and higher. It used to allow FFT length of 16. Here is the code snippet from the ei_arm_cmsis_dsp.h file:

 static bool can_do_fft(size_t n_fft)
 {
  return n_fft == 32 n_fft == 64 n_fft == 128 || n_fft == 256 || n_fft == 512
 	n_fft == 1024 n_fft == 2048 n_fft == 4096;
}

The EI default FFT length for spectral features is still 16, hence the discrepancy and error. EI still allows only a power-of-two FFT length to match the capabilities of the ARM DSP microcontrollers.

The upshot is that to get the minimum latency**, increase the FFT length in the spectral features in EI to** at least 32!

1 Like