From b00bfa6b72ee3f97db41898e331a85f568672cf4 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Thu, 19 Dec 2024 10:23:51 +0100 Subject: [PATCH 1/3] [whisper-cpp] Add version 1.7.3 --- recipes/whisper-cpp/all/conandata.yml | 3 +++ recipes/whisper-cpp/config.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/recipes/whisper-cpp/all/conandata.yml b/recipes/whisper-cpp/all/conandata.yml index 09dcb08b0e9bb..6dedf2adaf5ca 100644 --- a/recipes/whisper-cpp/all/conandata.yml +++ b/recipes/whisper-cpp/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.7.3": + url: "https://github.com/ggerganov/whisper.cpp/archive/refs/tags/v1.7.3.tar.gz" + sha256: "a36faa04885b45e4dd27751a37cb54300617717dbd3b7e5ec336f830e051a28c" "1.7.2": url: "https://github.com/ggerganov/whisper.cpp/archive/refs/tags/v1.7.2.tar.gz" sha256: "d48e1b5b6ee18b931e98ac791eba838f83eb3b81bb8917db37fe9a79fa5e3ccb" diff --git a/recipes/whisper-cpp/config.yml b/recipes/whisper-cpp/config.yml index de09f794ed1f1..1ad59e585e126 100644 --- a/recipes/whisper-cpp/config.yml +++ b/recipes/whisper-cpp/config.yml @@ -1,4 +1,6 @@ versions: + "1.7.3": + folder: "all" "1.7.2": folder: "all" "1.6.2": From 6539f8db677b8566e075006796ce1b84efcfad11 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Thu, 19 Dec 2024 15:50:56 +0100 Subject: [PATCH 2/3] Add libraries for 1.7.3+ --- recipes/whisper-cpp/all/conanfile.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/whisper-cpp/all/conanfile.py b/recipes/whisper-cpp/all/conanfile.py index 7351a78bc7271..31c59003f265a 100644 --- a/recipes/whisper-cpp/all/conanfile.py +++ b/recipes/whisper-cpp/all/conanfile.py @@ -198,8 +198,11 @@ def package_info(self): self.cpp_info.libs = ["whisper"] if Version(self.version) >= "1.7.0": self.cpp_info.libs.append("ggml") + if Version(self.version) >= "1.7.3": + self.cpp_info.libs.extend(["ggml-base", "ggml-blas", "ggml-cpu"]) self.cpp_info.resdirs = ["res"] - self.cpp_info.libdirs = ["lib", "lib/static"] + if Version(self.version) < "1.7.0": + self.cpp_info.libdirs = ["lib", "lib/static"] if self.options.get_safe("with_openvino"): self.cpp_info.requires = ["openvino::Runtime"] @@ -211,5 +214,7 @@ def package_info(self): self.cpp_info.frameworks.append("CoreML") if self.options.get_safe("metal"): self.cpp_info.frameworks.extend(["CoreFoundation", "Foundation", "Metal", "MetalKit"]) + if Version(self.version) >= "1.7.3": + self.cpp_info.libs.append("ggml-metal") elif self.settings.os in ("Linux", "FreeBSD"): self.cpp_info.system_libs.extend(["dl", "m", "pthread"]) From 695fa3a2738337593e12fc1f286feb3c26a4dbf8 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Thu, 19 Dec 2024 16:43:15 +0100 Subject: [PATCH 3/3] Improve blas support --- recipes/whisper-cpp/all/conanfile.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes/whisper-cpp/all/conanfile.py b/recipes/whisper-cpp/all/conanfile.py index 31c59003f265a..cd4be31356288 100644 --- a/recipes/whisper-cpp/all/conanfile.py +++ b/recipes/whisper-cpp/all/conanfile.py @@ -199,11 +199,13 @@ def package_info(self): if Version(self.version) >= "1.7.0": self.cpp_info.libs.append("ggml") if Version(self.version) >= "1.7.3": - self.cpp_info.libs.extend(["ggml-base", "ggml-blas", "ggml-cpu"]) + self.cpp_info.libs.extend(["ggml-base", "ggml-cpu"]) self.cpp_info.resdirs = ["res"] if Version(self.version) < "1.7.0": self.cpp_info.libdirs = ["lib", "lib/static"] + if self.options.get_safe("with_blas"): + self.cpp_info.requires = ["ggml-blas"] if self.options.get_safe("with_openvino"): self.cpp_info.requires = ["openvino::Runtime"] @@ -215,6 +217,6 @@ def package_info(self): if self.options.get_safe("metal"): self.cpp_info.frameworks.extend(["CoreFoundation", "Foundation", "Metal", "MetalKit"]) if Version(self.version) >= "1.7.3": - self.cpp_info.libs.append("ggml-metal") + self.cpp_info.libs.extend(["ggml-metal", "ggml-blas"]) elif self.settings.os in ("Linux", "FreeBSD"): self.cpp_info.system_libs.extend(["dl", "m", "pthread"])