From 332b94c236f2b215e72fe777ca5a09d9fc3ade28 Mon Sep 17 00:00:00 2001 From: maqi Date: Mon, 17 Feb 2025 11:33:56 +0800 Subject: [PATCH] add sw_64 support --- llama-add-sw64-support.patch | 24 ++++++++++++++++++++++++ llama.cpp.spec | 7 +++++-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 llama-add-sw64-support.patch diff --git a/llama-add-sw64-support.patch b/llama-add-sw64-support.patch new file mode 100644 index 0000000..eaff34e --- /dev/null +++ b/llama-add-sw64-support.patch @@ -0,0 +1,24 @@ +diff -Naur a/ggml.c b/ggml.c +--- a/ggml.c 2024-11-07 20:53:14.387559419 +0800 ++++ b/ggml.c 2024-11-07 21:00:03.059426329 +0800 +@@ -299,7 +299,7 @@ + #if defined(_MSC_VER) || defined(__MINGW32__) + #include + #else +-#if !defined(__riscv) && !defined(__loongarch64) ++#if !defined(__riscv) && !defined(__loongarch64) && !defined(__sw_64) + #include + #endif + #endif +diff -Naur a/k_quants.c b/k_quants.c +--- a/k_quants.c 2024-11-07 20:53:14.387559419 +0800 ++++ b/k_quants.c 2024-11-07 21:01:02.147440416 +0800 +@@ -26,7 +26,7 @@ + #if defined(_MSC_VER) || defined(__MINGW32__) + #include + #else +-#if !defined(__riscv) && !defined(__loongarch64) ++#if !defined(__riscv) && !defined(__loongarch64) && !defined(__sw_64) + #include + #endif + #endif diff --git a/llama.cpp.spec b/llama.cpp.spec index 19552ec..b1f6faa 100644 --- a/llama.cpp.spec +++ b/llama.cpp.spec @@ -3,14 +3,14 @@ Name: llama.cpp Version: 20230815 -Release: 4 +Release: 5 License: MIT Summary: Port of English lagre model LLaMA implemented based on C/C++ URL: https://github.com/ggerganov/llama.cpp Source0: https://github.com/ggerganov/llama.cpp/archive/refs/tags/%{llama_commitid}.tar.gz Patch0: add-loongarch64-support.patch - +Patch1: llama-add-sw64-support.patch BuildRequires: gcc,gcc-c++,cmake %description @@ -40,6 +40,9 @@ popd %{_libdir}/libembdinput.a %changelog +* Mon Feb 17 2025 maqi - 20230815-5 +- add sw_64 support + * Tue May 14 2024 wangshuo - 20230815-4 - add loongarch64 support -- Gitee