From 76facb3b6372f9e3957551083e8014ac7b68183d Mon Sep 17 00:00:00 2001 From: Nathan Smyth <3888305+jarjee@users.noreply.github.com> Date: Wed, 30 Apr 2025 22:21:12 +1000 Subject: [PATCH] fix: Correct broken hipblas build --- sys/build.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/build.rs b/sys/build.rs index bd3b0da..ba9466d 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"); }