!13 [sync] PR-12: Fix build error for loongarch64
From: @openeuler-sync-bot Reviewed-by: @znzjugod Signed-off-by: @znzjugod
This commit is contained in:
commit
c5e5ee8a61
25
0001-Fix-build-error-for-loongarch64.patch
Normal file
25
0001-Fix-build-error-for-loongarch64.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 3d913d653d9bf75ae56b46deeffb28874fedb6d1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhangzikang <zhangzikang@kylinos.cn>
|
||||||
|
Date: Fri, 17 May 2024 10:03:26 +0800
|
||||||
|
Subject: [PATCH] Fix build error for loongarch64
|
||||||
|
|
||||||
|
---
|
||||||
|
third_party/ggml/src/ggml.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/third_party/ggml/src/ggml.c b/third_party/ggml/src/ggml.c
|
||||||
|
index beb7f46..2374287 100644
|
||||||
|
--- a/third_party/ggml/src/ggml.c
|
||||||
|
+++ b/third_party/ggml/src/ggml.c
|
||||||
|
@@ -299,7 +299,7 @@ typedef double ggml_float;
|
||||||
|
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||||
|
#include <intrin.h>
|
||||||
|
#else
|
||||||
|
-#if !defined(__riscv)
|
||||||
|
+#if !defined(__riscv) && !defined(__loongarch64)
|
||||||
|
#include <immintrin.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
@ -2,13 +2,17 @@
|
|||||||
|
|
||||||
Name: chatglm-cpp
|
Name: chatglm-cpp
|
||||||
Version: 0.2.4
|
Version: 0.2.4
|
||||||
Release: 4
|
Release: 5
|
||||||
License: MIT
|
License: MIT
|
||||||
Summary: Port of Chinese lagre model ChatGLM-6B & ChatGLM2-6B implemented based on C/C++
|
Summary: Port of Chinese lagre model ChatGLM-6B & ChatGLM2-6B implemented based on C/C++
|
||||||
|
|
||||||
URL: https://github.com/li-plus/chatglm.cpp
|
URL: https://github.com/li-plus/chatglm.cpp
|
||||||
Source0: https://github.com/li-plus/chatglm.cpp/releases/download/0.2.4/chatglm-cpp-%{version}.tar.gz
|
Source0: https://github.com/li-plus/chatglm.cpp/releases/download/0.2.4/chatglm-cpp-%{version}.tar.gz
|
||||||
|
|
||||||
|
%ifarch loongarch64
|
||||||
|
Patch0: 0001-Fix-build-error-for-loongarch64.patch
|
||||||
|
%endif
|
||||||
|
|
||||||
BuildRequires: gcc,gcc-c++,cmake
|
BuildRequires: gcc,gcc-c++,cmake
|
||||||
Requires: sentencepiece
|
Requires: sentencepiece
|
||||||
|
|
||||||
@ -47,6 +51,9 @@ popd
|
|||||||
/usr/lib/static/libggml.a
|
/usr/lib/static/libggml.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri May 17 2024 zhangzikang <zhangzikang@kylinos.cn> - 0.2.4-5
|
||||||
|
- Fix build error for loongarch64
|
||||||
|
|
||||||
* Wed Sep 20 2023 zhoupengcheng <zhoupengcheng11@huawei.com> - 0.2.4-4
|
* Wed Sep 20 2023 zhoupengcheng <zhoupengcheng11@huawei.com> - 0.2.4-4
|
||||||
- packing chatglm_convert.py file
|
- packing chatglm_convert.py file
|
||||||
- install python models for chatglm_convert.py int dockerfile
|
- install python models for chatglm_convert.py int dockerfile
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user