wip : WASM 128-bit SIMD support

This commit is contained in:
Georgi Gerganov
2022-10-22 13:45:43 +03:00
parent e905c6f827
commit db460b78ff
5 changed files with 189 additions and 13 deletions

View File

@ -4,6 +4,7 @@
#include <emscripten/bind.h>
#include <vector>
#include <thread>
std::vector<struct whisper_context *> g_contexts(4, nullptr);
@ -47,7 +48,7 @@ EMSCRIPTEN_BINDINGS(whisper) {
params.print_special_tokens = false;
params.translate = false;
params.language = "en";
params.n_threads = 4;
params.n_threads = std::min(8, (int) std::thread::hardware_concurrency());
params.offset_ms = 0;
std::vector<float> pcmf32;