Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1b60556910
5 changed files with 21 additions and 1 deletions
|
|
@ -26,6 +26,7 @@ simd = []
|
||||||
coreml = ["whisper-rs-sys/coreml"]
|
coreml = ["whisper-rs-sys/coreml"]
|
||||||
cuda = ["whisper-rs-sys/cuda"]
|
cuda = ["whisper-rs-sys/cuda"]
|
||||||
opencl = ["whisper-rs-sys/opencl"]
|
opencl = ["whisper-rs-sys/opencl"]
|
||||||
|
openblas = ["whisper-rs-sys/openblas"]
|
||||||
test-with-tiny-model = []
|
test-with-tiny-model = []
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
|
|
|
||||||
|
|
@ -100,3 +100,14 @@ impl Default for SystemInfo {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_openblas() {
|
||||||
|
let info = SystemInfo::default();
|
||||||
|
assert_eq!(info.blas, cfg!(feature = "openblas"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ include = [
|
||||||
coreml = []
|
coreml = []
|
||||||
cuda = []
|
cuda = []
|
||||||
opencl = []
|
opencl = []
|
||||||
|
openblas = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,10 @@ fn main() {
|
||||||
println!("cargo:rustc-link-lib=clblast");
|
println!("cargo:rustc-link-lib=clblast");
|
||||||
println!("cargo:rustc-link-lib=OpenCL");
|
println!("cargo:rustc-link-lib=OpenCL");
|
||||||
}
|
}
|
||||||
|
#[cfg(feature = "openblas")]
|
||||||
|
{
|
||||||
|
println!("cargo:rustc-link-lib=openblas");
|
||||||
|
}
|
||||||
#[cfg(feature = "cuda")]
|
#[cfg(feature = "cuda")]
|
||||||
{
|
{
|
||||||
println!("cargo:rustc-link-lib=cublas");
|
println!("cargo:rustc-link-lib=cublas");
|
||||||
|
|
@ -109,6 +113,9 @@ fn main() {
|
||||||
#[cfg(feature = "cuda")]
|
#[cfg(feature = "cuda")]
|
||||||
cmd.arg("-DWHISPER_CUBLAS=ON");
|
cmd.arg("-DWHISPER_CUBLAS=ON");
|
||||||
|
|
||||||
|
#[cfg(feature = "openblas")]
|
||||||
|
cmd.arg("-DWHISPER_OPENBLAS=ON");
|
||||||
|
|
||||||
#[cfg(feature = "opencl")]
|
#[cfg(feature = "opencl")]
|
||||||
cmd.arg("-DWHISPER_CLBLAST=ON");
|
cmd.arg("-DWHISPER_CLBLAST=ON");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 91c0b23384fc3725013c4b6d3b35c45ad92dea0a
|
Subproject commit 1b775cdd68843fcfe331fc32ceb0d915c73a3cbd
|
||||||
Loading…
Add table
Add a link
Reference in a new issue