* A script to patch the wasm artifacts to use wormhole via
APIs that instantiate WASM module
* Updated README
* Load just production ready models
* Shallow clone bergamot-models repo since it has such a large history
* Improved wasm test_page
- test page can load all 5 language pairs
- Use intgemm.alpha* models
* Refactor the code that patches wasm artifacts to enable wormhole
Co-authored-by: Andre Natal <anatal@gmail.com>
Co-authored-by: Motin <motin@motin.eu>
* Merging two Services
* Moving stop() logic to destructor
* We have WITH_PTHREADS back
* string based constructor on Service
* Removing now empty service_base.* files
* Hiding away pcqueue_ construction
Ugliest ifdefs I have done in my life.
* Another ifdef to hide pcqueue header file
* Missing semicolons in WITH_PTHREADS path
* Fixing async_translate residue argument from copy
* Adding comments
* Initialize batchtranslator only at one place
To reduce tax for bytebuffer loads, initialize batchtranslator only at
one place.
* \#ifdef WITH_PTHREADS -> #ifndef WASM_HIDE_THREADS
Sane platform (non WASM) is default. This truly only hide-threads from
compilation path and not switch unswitch pthreads (-lpthread).
* Review comments: Rearranging destructor, fix wrong comment
* Move loadVocabularies to service.cpp and put in anonymous namespace
* Prettifying diff: Removing unwanted empty lines
* Indicate in comments multithreaded has numWorkers translators
* Typo fix: bergamot_translator -> bergamot-translator
* Safety guards to avoid pcqueue illegal init
* Add WASM_HIDE_THREADS as a global WASM_COMPILE_FLAG
* Compile Defs: WASM_HIDE_THREADS -> __EMSCRIPTEN__
* Removing dead CMakeLists.txt code following __EMSCRIPTEN__
* Compile defs: __EMSCRIPTEN__ -> WASM
* Switch to wasm branch for this example
* Load marian model from a byte array
* Sanitise executable names
* Change marian branch
* Update marian branch that loads binary models
* Example of loading model as a byte array
* Add the byte array loading files
* Die on misaligned memory
* Remove the unused argument
* Allow loading without a ptr parameter so that we don't break emc workflow
- 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
To fix WASM Mac builds on CI. loadVocabularies function is now inlines
and available through service_base.h, from where it seems to propogate
to all places of use.
Through inheritance, a non-threaded and multithreaded Service are
created, both derived of the same ServiceBase class which holds the
common elements.
In preparation to solve SIGSEGV in #41. First inspections gave aborts in
thread part, and repeated SIGSEGV's in lock-policy's of shared_pointers
even in non-threaded paths.
Solving this first, to avoid ifdef or tricky paths. The non-threaded
implementation is not included in WASM builds at all, by separating out
the single-threaded logic. DRY is achieved through inheritance and
operator overloading.
- USE_WASM_COMPATIBLE_MARIAN=off will start using vanilla Marian
i.e. with full threading support, with exceptions, with MKL
- Changed the relevant documentation