mirror of
https://github.com/browsermt/bergamot-translator.git
synced 2024-09-11 05:35:33 +03:00
Minor cleanup in build-wasm.sh file
This commit is contained in:
parent
1574a4586c
commit
a7f6bb51d9
@ -66,10 +66,8 @@ emcmake cmake -DCOMPILE_WASM=on -DPACKAGE_DIR="../models/" ../
|
|||||||
emmake make -j3
|
emmake make -j3
|
||||||
|
|
||||||
# 3. Enable SIMD Wormhole via Wasm instantiation API in generated artifacts
|
# 3. Enable SIMD Wormhole via Wasm instantiation API in generated artifacts
|
||||||
sed -i.bak 's/var result = WebAssembly.instantiateStreaming(response, info);/var result = WebAssembly.instantiateStreaming(response, info,{simdWormhole:true});/g' wasm/bergamot-translator-worker.js
|
bash ../wasm/patch-artifacts-enable-wormhole.sh
|
||||||
sed -i.bak 's/return WebAssembly.instantiate(binary, info);/return WebAssembly.instantiate(binary, info, {simdWormhole:true});/g' wasm/bergamot-translator-worker.js
|
|
||||||
sed -i.bak 's/var module = new WebAssembly.Module(bytes);/var module = new WebAssembly.Module(bytes, {simdWormhole:true});/g' wasm/bergamot-translator-worker.js
|
|
||||||
|
|
||||||
# The artefacts (.js and .wasm files) will be available in `wasm` folder of build directory ("build-wasm" in this case).
|
# The artifacts (.js and .wasm files) will be available in `wasm` folder of build directory ("build-wasm" in this case).
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user