mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-11-07 08:34:37 +01:00
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 <physicsdemon@gmail.com>
This commit is contained in:
parent
0377596b77
commit
31aea563a8
@ -3164,7 +3164,7 @@ static bool log_mel_spectrogram(
|
|||||||
std::vector<std::thread> workers(n_threads - 1);
|
std::vector<std::thread> workers(n_threads - 1);
|
||||||
for (int iw = 0; iw < n_threads - 1; ++iw) {
|
for (int iw = 0; iw < n_threads - 1; ++iw) {
|
||||||
workers[iw] = std::thread(
|
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,
|
n_samples + stage_2_pad, frame_size, frame_step, n_threads,
|
||||||
std::cref(filters), std::ref(mel));
|
std::cref(filters), std::ref(mel));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user