rten icon indicating copy to clipboard operation
rten copied to clipboard

WASM relaxed SIMD support

Open robertknight opened this issue 1 year ago • 1 comments

The WASM Relaxed SIMD instructions were stabilized in Rust v1.82.

This includes several instructions which should have a significant impact on performance if used in matrix multiplication kernels:

  1. f32x4_relaxed_madd for f32 kernels (https://github.com/robertknight/rten/pull/536)
  2. i32x4_relaxed_dot_i8x16_i7x16_add for int8 kernels. In the best case scenario this gets compiled to AVX VNNI or Arm SDOT

Attempting to use these instructions currently causes wasm-bindgen to fail because the feature is not supported in walrus.

robertknight avatar Oct 18 '24 19:10 robertknight

See also https://github.com/rustwasm/wasm-bindgen/issues/4263.

robertknight avatar Nov 14 '24 18:11 robertknight