From 4585bb82420c97ec0b5a39f7d94fd2bc0fd73138 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Mon, 11 Nov 2024 01:28:42 +0200 Subject: [PATCH 1/7] update whisper.cpp --- .gitmodules | 2 +- sys/whisper.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 0863136..1561ba4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "sys/whisper.cpp"] path = sys/whisper.cpp - url = https://github.com/ggerganov/whisper.cpp + url = https://github.com/thewh1teagle/whisper.cpp diff --git a/sys/whisper.cpp b/sys/whisper.cpp index 0377596..4cb3f81 160000 --- a/sys/whisper.cpp +++ b/sys/whisper.cpp @@ -1 +1 @@ -Subproject commit 0377596b77a3602e36430320cbe45f8c305ef04a +Subproject commit 4cb3f81b377f38149678351b9326d83152904bfb From 828ac50ca031442252be7d90216cd12bd1387c65 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:10:42 +0200 Subject: [PATCH 2/7] Update whisper.cpp --- sys/whisper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/whisper.cpp b/sys/whisper.cpp index 4cb3f81..ca99645 160000 --- a/sys/whisper.cpp +++ b/sys/whisper.cpp @@ -1 +1 @@ -Subproject commit 4cb3f81b377f38149678351b9326d83152904bfb +Subproject commit ca99645e20f45a7904771192122fc79a9871a109 From fab85025be2fc90c7fbf03aad80cb0747160de09 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:25:22 +0200 Subject: [PATCH 3/7] update whisper.cpp to 7fd8d9 --- src/standalone.rs | 4 ---- sys/whisper.cpp | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/standalone.rs b/src/standalone.rs index 7319126..2b0d439 100644 --- a/src/standalone.rs +++ b/src/standalone.rs @@ -105,8 +105,6 @@ pub struct SystemInfo { pub avx2: bool, pub fma: bool, pub f16c: bool, - pub blas: bool, - pub cuda: bool, } impl Default for SystemInfo { @@ -117,8 +115,6 @@ impl Default for SystemInfo { avx2: whisper_rs_sys::ggml_cpu_has_avx2() != 0, fma: whisper_rs_sys::ggml_cpu_has_fma() != 0, f16c: whisper_rs_sys::ggml_cpu_has_f16c() != 0, - blas: whisper_rs_sys::ggml_cpu_has_blas() != 0, - cuda: whisper_rs_sys::ggml_cpu_has_cuda() != 0, } } } diff --git a/sys/whisper.cpp b/sys/whisper.cpp index 0377596..8c6a9b8 160000 --- a/sys/whisper.cpp +++ b/sys/whisper.cpp @@ -1 +1 @@ -Subproject commit 0377596b77a3602e36430320cbe45f8c305ef04a +Subproject commit 8c6a9b8bb6a0273cc0b5915903ca1ff9206c6285 From 6b4cd34f0db5a3b9c562d351cbe205f33fe4980d Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:30:13 +0200 Subject: [PATCH 4/7] update whisper.cpp --- sys/whisper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/whisper.cpp b/sys/whisper.cpp index 8c6a9b8..ca99645 160000 --- a/sys/whisper.cpp +++ b/sys/whisper.cpp @@ -1 +1 @@ -Subproject commit 8c6a9b8bb6a0273cc0b5915903ca1ff9206c6285 +Subproject commit ca99645e20f45a7904771192122fc79a9871a109 From 783a7858dbf14cc8d7af454190089f3ff6ad378b Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:46:08 +0200 Subject: [PATCH 5/7] fix: link ggml --- sys/build.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/build.rs b/sys/build.rs index ef72d84..b69f211 100644 --- a/sys/build.rs +++ b/sys/build.rs @@ -253,6 +253,9 @@ fn main() { println!("cargo:rustc-link-search=native={}", destination.display()); println!("cargo:rustc-link-lib=static=whisper"); println!("cargo:rustc-link-lib=static=ggml"); + println!("cargo:rustc-link-lib=static=ggml-base"); + println!("cargo:rustc-link-lib=static=ggml-cpu"); + println!("cargo:rustc-link-lib=static=ggml-blas"); println!( "cargo:WHISPER_CPP_VERSION={}", From 029c1c424b4686219d3de56ec35467f218603ba8 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:53:39 +0200 Subject: [PATCH 6/7] fix: link metal --- sys/build.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/build.rs b/sys/build.rs index b69f211..a45cb74 100644 --- a/sys/build.rs +++ b/sys/build.rs @@ -257,6 +257,10 @@ fn main() { println!("cargo:rustc-link-lib=static=ggml-cpu"); println!("cargo:rustc-link-lib=static=ggml-blas"); + if cfg!(feature = "metal") { + println!("cargo:rustc-link-lib=static=ggml-metal"); + } + println!( "cargo:WHISPER_CPP_VERSION={}", get_whisper_cpp_version(&whisper_root) From ea9d6bc8bbd47c1e093e7e38164a6029d763f95b Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Wed, 27 Nov 2024 19:40:26 +0200 Subject: [PATCH 7/7] fix vulkan link --- sys/build.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/build.rs b/sys/build.rs index a45cb74..01f5b6d 100644 --- a/sys/build.rs +++ b/sys/build.rs @@ -255,7 +255,13 @@ fn main() { println!("cargo:rustc-link-lib=static=ggml"); println!("cargo:rustc-link-lib=static=ggml-base"); println!("cargo:rustc-link-lib=static=ggml-cpu"); - println!("cargo:rustc-link-lib=static=ggml-blas"); + if cfg!(target_os = "macos") { + println!("cargo:rustc-link-lib=static=ggml-blas"); + } + if cfg!(feature = "vulkan") { + println!("cargo:rustc-link-lib=static=ggml-vulkan"); + } + if cfg!(feature = "metal") { println!("cargo:rustc-link-lib=static=ggml-metal");