Merge pull request #90 from marmistrz/openblas

Add an OpenBLAS feature
This commit is contained in:
Niko 2023-10-08 14:40:46 +00:00 committed by GitHub
commit 174e111ebc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 0 deletions

View file

@ -36,6 +36,7 @@ include = [
coreml = []
cuda = []
opencl = []
openblas = []
[dependencies]

View file

@ -31,6 +31,10 @@ fn main() {
println!("cargo:rustc-link-lib=clblast");
println!("cargo:rustc-link-lib=OpenCL");
}
#[cfg(feature = "openblas")]
{
println!("cargo:rustc-link-lib=openblas");
}
#[cfg(feature = "cuda")]
{
println!("cargo:rustc-link-lib=cublas");
@ -109,6 +113,9 @@ fn main() {
#[cfg(feature = "cuda")]
cmd.arg("-DWHISPER_CUBLAS=ON");
#[cfg(feature = "openblas")]
cmd.arg("-DWHISPER_OPENBLAS=ON");
#[cfg(feature = "opencl")]
cmd.arg("-DWHISPER_CLBLAST=ON");