From 45b2d8c6ae4242359d4f05efce3111adefb8af16d8f33e46e605082042d33892 Mon Sep 17 00:00:00 2001 From: Eyad Issa Date: Wed, 22 May 2024 20:22:14 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/ollama?expand=0&rev=21 --- ollama.changes | 1 - ollama.spec | 2 -- riscv.patch | 38 -------------------------------------- 3 files changed, 41 deletions(-) delete mode 100644 riscv.patch diff --git a/ollama.changes b/ollama.changes index d070d48..1733569 100644 --- a/ollama.changes +++ b/ollama.changes @@ -2,7 +2,6 @@ Wed May 22 18:05:30 UTC 2024 - Eyad Issa - Added 15.6 build -- Added patch to build on RISC-V arch ------------------------------------------------------------------- Thu May 16 19:55:51 UTC 2024 - Eyad Issa diff --git a/ollama.spec b/ollama.spec index 7be2577..e6624df 100644 --- a/ollama.spec +++ b/ollama.spec @@ -40,8 +40,6 @@ BuildRequires: golang(API) >= 1.22 %{sysusers_requires} -Patch24300: riscv.patch - %description Ollama is a tool for running AI models on one's own hardware. It offers a command-line interface and a RESTful API. diff --git a/riscv.patch b/riscv.patch deleted file mode 100644 index 8f50500..0000000 --- a/riscv.patch +++ /dev/null @@ -1,38 +0,0 @@ -Index: ollama-0.1.37/llm/llm.go -=================================================================== ---- ollama-0.1.37.orig/llm/llm.go -+++ ollama-0.1.37/llm/llm.go -@@ -7,6 +7,7 @@ package llm - // #cgo windows,arm64 LDFLAGS: ${SRCDIR}/build/windows/arm64_static/libllama.a -static -lstdc++ - // #cgo linux,amd64 LDFLAGS: ${SRCDIR}/build/linux/x86_64_static/libllama.a -lstdc++ - // #cgo linux,arm64 LDFLAGS: ${SRCDIR}/build/linux/arm64_static/libllama.a -lstdc++ -+// #cgo linux,riscv64 LDFLAGS: ${SRCDIR}/build/linux/riscv64_static/libllama.a -lstdc++ - // #include - // #include "llama.h" - import "C" -Index: ollama-0.1.37/vendor/github.com/chewxy/math32/stubs_riscv64.s -=================================================================== ---- /dev/null -+++ ollama-0.1.37/vendor/github.com/chewxy/math32/stubs_riscv64.s -@@ -0,0 +1,21 @@ -+#include "textflag.h" -+ -+// func Exp(x float32) float32 -+TEXT ·Exp(SB),NOSPLIT,$0 -+ JMP ·exp(SB) -+ -+// func Exp2(x float32) float32 -+TEXT ·Exp2(SB),NOSPLIT,$0 -+ JMP ·exp2(SB) -+ -+// func Log(x float32) float32 -+TEXT ·Log(SB),NOSPLIT,$0 -+ JMP ·log(SB) -+ -+// func Remainder(x, y float32) float32 -+TEXT ·Remainder(SB),NOSPLIT,$0 -+ JMP ·remainder(SB) -+ -+// func Sqrt(x float32) float32 -+TEXT ·Sqrt(SB),NOSPLIT,$0 -+ JMP ·sqrt(SB)