Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid calling C functions wrapping intgemm if intrinsic isn't native #66

Open
Tracked by #205
kpu opened this issue Nov 16, 2021 · 0 comments
Open
Tracked by #205

Avoid calling C functions wrapping intgemm if intrinsic isn't native #66

kpu opened this issue Nov 16, 2021 · 0 comments

Comments

@kpu
Copy link
Member

kpu commented Nov 16, 2021

I'm letting browsermt/bergamot-translator#265 in because it's a net improvement. But for the use case where Firefox isn't providing native multiplication, it will be slower due to bouncing WASM to JS to WASM every call. Instead the C++ should just not call the C functions and use the C++ interface to intgemm directly.

This requires sensing the presence of the native support at runtime. Options are JS tells us (in configuration) or C++ senses it by e.g. having incorrect implementations of the C functions internally / setting a global variable from the implementation that tells it to use the internal implementation (C++ on top of webassembly).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant