diff --git a/add-loongarch64-support.patch b/add-loongarch64-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..c9ec16211ae15b970f4348751185bdf1f704fd06 --- /dev/null +++ b/add-loongarch64-support.patch @@ -0,0 +1,26 @@ +diff --git a/ggml.c b/ggml.c +index beb7f46..2374287 100644 +--- a/ggml.c ++++ b/ggml.c +@@ -299,7 +299,7 @@ typedef double ggml_float; + #if defined(_MSC_VER) || defined(__MINGW32__) + #include + #else +-#if !defined(__riscv) ++#if !defined(__riscv) && !defined(__loongarch64) + #include + #endif + #endif +diff --git a/k_quants.c b/k_quants.c +index 6348fce..6816121 100644 +--- a/k_quants.c ++++ b/k_quants.c +@@ -26,7 +26,7 @@ + #if defined(_MSC_VER) || defined(__MINGW32__) + #include + #else +-#if !defined(__riscv) ++#if !defined(__riscv) && !defined(__loongarch64) + #include + #endif + #endif diff --git a/llama.cpp.spec b/llama.cpp.spec index 01defcfe9ed52729733d3c2ad0467d561e548410..19552ecbbab08e47308ead4de885eb5238ea174c 100644 --- a/llama.cpp.spec +++ b/llama.cpp.spec @@ -3,12 +3,13 @@ Name: llama.cpp Version: 20230815 -Release: 3 +Release: 4 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 BuildRequires: gcc,gcc-c++,cmake @@ -39,6 +40,9 @@ popd %{_libdir}/libembdinput.a %changelog +* Tue May 14 2024 wangshuo - 20230815-4 +- add loongarch64 support + * Wed Sep 20 2023 zhoupengcheng - 20230815-3 - rename /usr/bin/convert.py - update long-term yum.repo in dockerfile