Warning
DEPRECATED. This guide describes the manual BLAS setup for peroxide <= 0.40 and is outdated. Since peroxide 0.41.1, backend selection is built into the crate's feature flags:
cargo add peroxide --features O3-openblas # OpenBLAS compiled from source
cargo add peroxide --features O3-openblas-system # system-installed OpenBLAS (pkg-config)
cargo add peroxide --features O3-accelerate # Apple Accelerate (macOS)
cargo add peroxide --features O3-mkl # Intel MKLSee the Pre-requisite section of the main README for details. The bare O3 flag remains available as an escape hatch for custom backends such as BLIS; only in that case does the manual setup below still apply. This repository is kept for historical reference and is archived.
Peroxide uses blas and lapack crate in O3 feature. But they are just wrapper crates, so we need source crates.
There are several source crates to provide concrete implementations of BLAS and LAPACK.
And they have system feature to skip building the bundled BLAS implementation.
For specifically, I'll explain Arch-linux case.
In arch linux, you can install openblas or blis. (Also blas is there, but blas-src does not provide system feature.)
- Use OpenBLAS
: Add
openblas-srcdependency toCargo.tomlas same as this repo's Cargo.toml - Use BLIS
: Add
blis-srcdependency toCargo.tomlas same as this repo's Cargo.toml
And add extern crate <CRATE> to your lib.rs or main.rs. The <CRATE> is one of above source crates.
In this repo, I used blis-src.