Skip to content
This repository has been archived by the owner on Nov 18, 2023. It is now read-only.

Commit

Permalink
enable initThreadPool (still broken)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtb0x1 committed Oct 11, 2023
1 parent 3f4da18 commit 4579202
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions port1/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,16 @@
// 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);
//requires https://stackoverflow.com/questions/72881660/web-worker-blocked-by-self-crossoriginisolated-on-cypress
//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 ="";
Expand Down

0 comments on commit 4579202

Please sign in to comment.