From 31aea563a83803c710691fed3e8d700e06ae6788 Mon Sep 17 00:00:00 2001 From: Vin Misra Date: Wed, 6 Nov 2024 13:02:11 -0800 Subject: [PATCH] whisper : fix extra memory usage (#2534) * passing samples_padded by ref to the threads. * passing samples_padded by ref to the threads. --------- Co-authored-by: Vinith Misra --- src/whisper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/whisper.cpp b/src/whisper.cpp index 08f1ef01752..e97a6883f89 100644 --- a/src/whisper.cpp +++ b/src/whisper.cpp @@ -3164,7 +3164,7 @@ static bool log_mel_spectrogram( std::vector workers(n_threads - 1); for (int iw = 0; iw < n_threads - 1; ++iw) { workers[iw] = std::thread( - log_mel_spectrogram_worker_thread, iw + 1, hann, samples_padded, + log_mel_spectrogram_worker_thread, iw + 1, hann, std::cref(samples_padded), n_samples + stage_2_pad, frame_size, frame_step, n_threads, std::cref(filters), std::ref(mel)); }