From 4579202b991ee69d24f01af9948b3696fd1735ed Mon Sep 17 00:00:00 2001 From: mtb0x1 <39337159+mtb0x1@users.noreply.github.com> Date: Wed, 11 Oct 2023 11:56:41 +0200 Subject: [PATCH] enable initThreadPool (still broken) --- port1/www/index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/port1/www/index.html b/port1/www/index.html index 6ebc39a..7cea770 100644 --- a/port1/www/index.html +++ b/port1/www/index.html @@ -62,7 +62,8 @@ // eventually the manual initialization won't be required! import init, { main_wasm, initThreadPool } from './pkg/port1.js'; await init(); - + await initThreadPool(navigator.hardwareConcurrency); + async function run() { if (navigator.hardwareConcurrency >0){ const cpus_in_use = Math.ceil(navigator.hardwareConcurrency*0.75); @@ -70,7 +71,7 @@ //Cross-Origin-Opener-Policy="same-origin" //Cross-Origin-Embedder-Policy="require-corp" //Fixme(https://github.com/mtb0x1/llama2.rs.wasm/issues/1) - //initThreadPool(cpus_in_use); + //await initThreadPool(cpus_in_use); } document.getElementById("output").value ="";