This repository has been archived by the owner on Dec 14, 2023. It is now read-only.
forked from browsermt/bergamot-translator
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- test page can load all 5 language pairs - Use intgemm.aplha* models - start_server.sh script automatically enable simdwormhole via APIs that instantiate WASM module
- Loading branch information
Showing
2 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
#!/bin/bash | ||
|
||
echo "Start: Copying artifacts in local folder------" | ||
cp ../../build-wasm/wasm/bergamot-translator-worker.data . | ||
cp ../../build-wasm/wasm/bergamot-translator-worker.js . | ||
cp ../../build-wasm/wasm/bergamot-translator-worker.wasm . | ||
cp ../../build-wasm/wasm/bergamot-translator-worker.worker.js . | ||
echo "Done----" | ||
|
||
echo "Start: 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' bergamot-translator-worker.js | ||
sed -i.bak 's/return WebAssembly.instantiate(binary, info);/return WebAssembly.instantiate(binary, info, {simdWormhole:true});/g' bergamot-translator-worker.js | ||
sed -i.bak 's/var module = new WebAssembly.Module(bytes);/var module = new WebAssembly.Module(bytes, {simdWormhole:true});/g' bergamot-translator-worker.js | ||
echo "Done: Enabling wormhole via APIs that compile and instantiate wasm module--------" | ||
|
||
npm install | ||
echo "Start httpserver" | ||
node bergamot-httpserver.js |