-
Notifications
You must be signed in to change notification settings - Fork 215
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
Wasm SIMD support #1361
Comments
|
Great, thanks! I am learning the source code of tract and my current understanding is to add How would you approach this on the high-level if you were to implement Wasm SIMD? |
You should try to produce a square-ish mat * mul (m=n) implementation, and also a mat * vec (n=1). You should be able leverage the tests available for the others products. Start implementing return_zero, return_c, the add/mul by row and cols: these are the one that will cover the load and store functions. Do the actual dot product at the end. Have fun! And feel free to ask any question. |
Depending on your familiarity of efficient mat mul implemetation, you may want to check out the sonos tech blog articles (https://tech-blog.sonos.com/posts/the-anatomy-of-efficient-matrix-multipliers/ and part 3). For tile sizes, I would probably start with 8x8 (easy to map to aarch64 and intel) and 32x1 for mat vec. |
Thank you for the pointers @kali! |
Wasm SIMD is a stable feature that is supported by many Wasm runtimes. It is available in Rust in core::arch::wasm32.
I have two questions to the maintainers:
The text was updated successfully, but these errors were encountered: