]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
Remove unnecessary memory reallocation in fft (whisper/2080)
authorgoldwaving <redacted>
Sun, 28 Apr 2024 17:36:12 +0000 (15:06 -0230)
committerGeorgi Gerganov <redacted>
Tue, 14 May 2024 12:31:03 +0000 (15:31 +0300)
commit10b94e45341d15e23b658a244090740d3b8cdd82
tree5c37b6e41f85ba0365d8fe619722debb624351bf
parent0cf884c04a43c689848b67d156364b42ef9ad0f2
Remove unnecessary memory reallocation in fft (whisper/2080)

fft_out needs to be twice the frame_size, not the frame_step.  It is resized in fft() anyway, but this change prevents an unnecessary reallocation.

n_fft must match the mel filter size, so it is best not to calculate it from the framesize.

We only need to get the magnitudes for half the spectrum since the other half is a mirror and not used in the mel filter loop later.
examples/whisper/whisper.cpp