bluss / matrixmultiply

General matrix multiplication of f32 and f64 matrices in Rust. Supports matrices with general strides.
https://docs.rs/matrixmultiply/
Apache License 2.0
213 stars 25 forks source link

Allow tweaking size parameters at compile time #59

Closed bluss closed 3 years ago

bluss commented 3 years ago

This introduces compile-time tweak environment variables like this:

etc for each gemm. These allow setting these size parameters at compile time - they should ideally be optimized per kernel and microarch.

Combine these parameters with the benchmark in ./examples/benchmark.rs and its csv output option - this allows optimizing performance depending on these parameters. This was already useful for complex.

Using DutchGhost's const parsing code from

https://gist.github.com/DutchGhost/d8604a3c796479777fe9f5e25d855cfd

which has been very useful.

Co-authored-by: DutchGhost DutchGhost@users.noreply.github.com

bluss commented 3 years ago

cc @DutchGhost thanks :slightly_smiling_face: (Previous discussion)