add libraries to CUDA search path

This commit is contained in:
Zero 2023-05-05 22:45:08 -06:00
parent e2f39c9c25
commit 9dd66a3b4b
No known key found for this signature in database
GPG key ID: 3861E636EA1E0E2B

View file

@ -31,6 +31,15 @@ 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 = "cuda")]
{
println!("cargo:rustc-link-lib=cublas");
println!("cargo:rustc-link-lib=culibos");
println!("cargo:rustc-link-lib=cudart");
println!("cargo:rustc-link-lib=cublasLt");
println!("cargo:rustc-link-search=/usr/local/cuda/lib64");
println!("cargo:rustc-link-search=/opt/cuda/lib64");
}
println!("cargo:rerun-if-changed=wrapper.h"); println!("cargo:rerun-if-changed=wrapper.h");
if env::var("WHISPER_DONT_GENERATE_BINDINGS").is_ok() { if env::var("WHISPER_DONT_GENERATE_BINDINGS").is_ok() {