#machine-learning #vectorized #simd #function #mathml #models

rten-vecmath

SIMD vectorized implementations of various math functions used in ML models

6 releases (breaking)

0.7.0 Apr 12, 2024
0.6.0 Mar 31, 2024
0.4.0 Feb 8, 2024
0.3.0 Jan 23, 2024
0.1.0 Dec 31, 2023

#429 in Machine learning

Download history 218/week @ 2024-01-04 49/week @ 2024-01-11 51/week @ 2024-01-18 28/week @ 2024-01-25 36/week @ 2024-02-01 91/week @ 2024-02-08 83/week @ 2024-02-15 125/week @ 2024-02-22 135/week @ 2024-02-29 149/week @ 2024-03-07 161/week @ 2024-03-14 215/week @ 2024-03-21 840/week @ 2024-03-28 205/week @ 2024-04-04 266/week @ 2024-04-11 36/week @ 2024-04-18

1,399 downloads per month
Used in 5 crates (via rten)

MIT/Apache

72KB
1.5K SLoC

rten-vecmath

SIMD vectorized versions of math functions such as exp, erf, tanh, softmax etc. that are performance-critical in machine-learning models.


lib.rs:

SIMD-vectorized implementations of various math functions that are commonly used in neural networks.

For each function in this library there are multiple variants, which typically include:

  • A version that operates on scalars
  • A version that reads values from an input slice and writes to the corresponding position in an equal-length output slice. These have a vec_ prefix.
  • A version that reads values from a mutable input slice and writes the computed values back in-place. These have a vec_ prefix and _in_place suffix.

All variants use the same underlying implementation and should have the same accuracy.

See the source code for comments on accuracy.

No runtime deps