Skip to content

Commit

Permalink
Remove the wormhole, v2
Browse files Browse the repository at this point in the history
  • Loading branch information
XapaJIaMnu committed Aug 14, 2023
1 parent f8058ac commit 300a50f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ If you used the script `package-benchmark.sh` mentioned above then open followin

`http://localhost:8000/marian-decoder.html?arguments=-m /model.intgemm.alphas.bin -v /vocab.esen.spm /vocab.esen.spm -i /newstest2013.es.top300lines --beam-size 1 --mini-batch 32 --maxi-batch 100 --maxi-batch-sort src -w 128 --skip-cost --shortlist /lex.s2t 50 50 --cpu-threads 1 --int8shiftAlphaAll`

Note that intgemm options are only available in Firefox Nightly verified by visiting [this link](https://axis-of-eval.org/sandbox/wormhole-test.html).


### <a name="Docker-Compilation"></a> Compiling wasm marian-decoder on Docker

Alternatively, wasm marian-decoder can also be compiled on docker.
Expand Down
6 changes: 0 additions & 6 deletions wasm/package-benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ fi
echo "Packaging files for wasm binary"
$EMSDK_PYTHON $EMSDK/upstream/emscripten/tools/file_packager.py model-files.data --preload ../models/@ --js-output=model-files.js

echo "Enabling wormhole via APIs that compile and instantiate wasm module"
sed -i.bak 's/var result = WebAssembly.instantiateStreaming(response, info);/var result = WebAssembly.instantiateStreaming(response, info, {simdWormhole:true});/g' marian-decoder.js
sed -i.bak 's/return WebAssembly.instantiate(binary, info);/return WebAssembly.instantiate(binary, info, {simdWormhole:true});/g' marian-decoder.js
sed -i.bak 's/var module = new WebAssembly.Module(bytes);/var module = new WebAssembly.Module(bytes, {simdWormhole:true});/g' marian-decoder.js
echo "SUCCESS"

echo "Importing integer (8-bit) gemm implementation"
SCRIPT_ABSOLUTE_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
sed -i.bak 's/"env"[[:space:]]*:[[:space:]]*asmLibraryArg,/"env": asmLibraryArg,\
Expand Down

0 comments on commit 300a50f

Please sign in to comment.