Blasoxide - BLAS implementation in rust


I wanted have a BLAS library that is easy and fast to compile, also learn how to implement math functions on a computer, so I started this library.

This library is very new, I just finished implementing sgemm, It has only single precision level1 routines, sgemv, and sgemm. Right now sgemm is slightly faster than numpy(OpenBLAS) on my cpu (Ryzen 2200g). All functions use avx and fma so it only supports thoose cpus and I would like to support more cpus, also have implementations of all BLAS functions.

I am 3rd year bachelors degree student and new to BLAS, so I would like knowlegable people to criticize and help me build this library. Also adding more tests and benchmarks or only running benchmarks on your cpu would be good.


sgemm implementation is heavily inspired by:


Looks very nice! Current BLAS alternatives in Rust (I'm thinking of can be quite cumbersome if you don't have the required libraries installed on your system.
This could be a nice alternative, especially if you manage to get on par performance with openblas. Looking forward to seeing how this evolves. Any plan for doing LAPACK as well? :smile:

1 Like


I would like to do LAPACK aswell but my linear algebra knowledge isn't that good (I don't even know what LAPACK is used for). I will develop blasoxide all summer. I might do LAPACK after.

I also want to make a high level linear algebra library with matrix and vector types because I think current libraries are hard to understhand with many types and complicated apis with generics and traits.

Note for people who want to contribute:
I found these books If you want to learn how to implement linear algebra on a computer and contribute to blasoxide I think Linear Algebra: Foundations to Frontiers is a great book. I am reading it currently to learn. I find implementing fast BLAS functions very satisfying.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.