JuliaLinearAlgebra / Octavian.jl

Multi-threaded BLAS-like library that provides pure Julia matrix multiplication
https://julialinearalgebra.github.io/Octavian.jl/stable/
Other
226 stars 18 forks source link

Question: how can I use this as default? #187

Closed prbzrg closed 5 months ago

prbzrg commented 8 months ago

When I import MKL in the first line of my codes, it will be the default BLAS for the whole code instead of the Julia's default BLAS (OpenBLAS). How can I get the same result with Octavian?

chriselrod commented 8 months ago

When I import MKL in the first line of my codes, it will be the default BLAS for the whole code instead of the Julia's default BLAS (OpenBLAS). How can I get the same result with Octavian?

There is no good way, so it isn't recommended.

For one thing, OpenBLAS does all of BLAS and LAPACK. Octavian basically only does gemm and gemv.

It would be interesting to try swapping out only OpenBLAS's gemm for Octavian's, though. It's the building block of many of the other routines, and Octavian tends to be much faster at small sizes, which is important for those other routines (as they're calling gemm on small sub-blocks).

But there are no plans for actually implementing that, so it isn't possible at the moment.