diff --git a/sys/build.rs b/sys/build.rs index bd3b0da3..ba9466da 100644 --- a/sys/build.rs +++ b/sys/build.rs @@ -178,7 +178,7 @@ fn main() { } if cfg!(feature = "hipblas") { - config.define("GGML_HIPBLAS", "ON"); + config.define("GGML_HIP", "ON"); config.define("CMAKE_C_COMPILER", "hipcc"); config.define("CMAKE_CXX_COMPILER", "hipcc"); println!("cargo:rerun-if-env-changed=AMDGPU_TARGETS"); @@ -272,6 +272,10 @@ fn main() { println!("cargo:rustc-link-lib=static=ggml-vulkan"); } + if cfg!(feature = "hipblas") { + println!("cargo:rustc-link-lib=static=ggml-hip"); + } + if cfg!(feature = "metal") { println!("cargo:rustc-link-lib=static=ggml-metal"); }