Skip to content

Commit 31aea56

Browse files
vinmisraVinith Misra
andauthored
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 <[email protected]>
1 parent 0377596 commit 31aea56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/whisper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3164,7 +3164,7 @@ static bool log_mel_spectrogram(
31643164
std::vector<std::thread> workers(n_threads - 1);
31653165
for (int iw = 0; iw < n_threads - 1; ++iw) {
31663166
workers[iw] = std::thread(
3167-
log_mel_spectrogram_worker_thread, iw + 1, hann, samples_padded,
3167+
log_mel_spectrogram_worker_thread, iw + 1, hann, std::cref(samples_padded),
31683168
n_samples + stage_2_pad, frame_size, frame_step, n_threads,
31693169
std::cref(filters), std::ref(mel));
31703170
}

0 commit comments

Comments
 (0)