browsermt/bergamot-translator

Import matrix-multiply from a separate wasm module

Closed this issue · 0 comments

For generic matrix multiply interface:

  • Restructure marian-dev, allowing it to import different implementations of generic matrix multiply interface for wasm target
  • Add a fallback (a polyfill) dummy implementation of this interface in marian-dev for wasm target and export it from marian wasm module
    • The fallback dummy implementation can throw initially
  • Change emscripten generated JS glue code to plug in this fallback implementation (until an optimized implementation is not landed in Firefox)
  • Verify the restructuring by running wasm artifacts on wasm test page
  • Provide a valid (non-dummy) fallback implementations for entire interface

bergamot-translator:

  • Make all the necessary changes in bergamot-translator for this feature
  • #264

We want to support the fastest configuration --int8shiftAlphaAll