From 77ba7866b0ac854767c2db59162034646a7da1b5 Mon Sep 17 00:00:00 2001 From: Marco Matthies <71844+marcom@users.noreply.github.com> Date: Sun, 16 Apr 2023 10:38:41 +0200 Subject: [PATCH 1/5] [llama_cpp] Bump version --- L/llama_cpp/build_tarballs.jl | 9 +++++---- .../bundled/patches/windows-add-ctime-include.patch | 12 ++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 L/llama_cpp/bundled/patches/windows-add-ctime-include.patch diff --git a/L/llama_cpp/build_tarballs.jl b/L/llama_cpp/build_tarballs.jl index b23422a6e71..f1d81108876 100644 --- a/L/llama_cpp/build_tarballs.jl +++ b/L/llama_cpp/build_tarballs.jl @@ -6,7 +6,7 @@ version = v"0.0.6" # fake version number # url = "https://github.com/ggerganov/llama.cpp" # description = "Port of Facebook's LLaMA model in C/C++" -# TODO +# NOTES # - missing architectures: powerpc64le, armv6l, arm7vl # versions: fake_version to github_version mapping @@ -18,10 +18,11 @@ version = v"0.0.6" # fake version number # 0.0.4 25.03.2023 master-1972616 https://github.com/ggerganov/llama.cpp/releases/tag/master-1972616 # 0.0.5 30.03.2023 master-3bcc129 https://github.com/ggerganov/llama.cpp/releases/tag/master-3bcc129 # 0.0.6 03.04.2023 master-437e778 https://github.com/ggerganov/llama.cpp/releases/tag/master-437e778 +# 0.0.7 14.04.2023 master-2f7c8e0 https://github.com/ggerganov/llama.cpp/releases/tag/master-2f7c8e0 sources = [ GitSource("https://github.com/ggerganov/llama.cpp.git", - "437e77855a54e69c86fe03bc501f63d9a3fddb0e"), + "2f7c8e014e3c0ceaf39688845c2ff6f919fb03b7"), DirectorySource("./bundled"), ] @@ -30,8 +31,8 @@ cd $WORKSPACE/srcdir/llama.cpp* # remove -march=native from cmake files atomic_patch -p1 ../patches/cmake-remove-mcpu-native.patch -# fix compilation (include Windows.h) on w64-mingw32 -atomic_patch -p1 ../patches/fix-mingw32-windows-include.patch +# add missing ctime include to fix compilation on windows +atomic_patch -p1 ../patches/windows-add-ctime-include.patch EXTRA_CMAKE_ARGS= if [[ "${target}" == *-linux-* ]]; then diff --git a/L/llama_cpp/bundled/patches/windows-add-ctime-include.patch b/L/llama_cpp/bundled/patches/windows-add-ctime-include.patch new file mode 100644 index 00000000000..d4d74ce1c4d --- /dev/null +++ b/L/llama_cpp/bundled/patches/windows-add-ctime-include.patch @@ -0,0 +1,12 @@ +diff --git a/llama.cpp b/llama.cpp +index be8c4cd..1552d60 100644 +--- a/llama.cpp ++++ b/llama.cpp +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + #define LLAMA_USE_SCRATCH + #define LLAMA_MAX_SCRATCH_BUFFERS 16 From 4308fbad912e21ec5ba332964e06e38da1f9f755 Mon Sep 17 00:00:00 2001 From: Marco Matthies <71844+marcom@users.noreply.github.com> Date: Sun, 16 Apr 2023 10:42:42 +0200 Subject: [PATCH 2/5] fix date when this version of llama.cpp was released --- L/llama_cpp/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/L/llama_cpp/build_tarballs.jl b/L/llama_cpp/build_tarballs.jl index f1d81108876..421c751b44c 100644 --- a/L/llama_cpp/build_tarballs.jl +++ b/L/llama_cpp/build_tarballs.jl @@ -18,7 +18,7 @@ version = v"0.0.6" # fake version number # 0.0.4 25.03.2023 master-1972616 https://github.com/ggerganov/llama.cpp/releases/tag/master-1972616 # 0.0.5 30.03.2023 master-3bcc129 https://github.com/ggerganov/llama.cpp/releases/tag/master-3bcc129 # 0.0.6 03.04.2023 master-437e778 https://github.com/ggerganov/llama.cpp/releases/tag/master-437e778 -# 0.0.7 14.04.2023 master-2f7c8e0 https://github.com/ggerganov/llama.cpp/releases/tag/master-2f7c8e0 +# 0.0.7 15.04.2023 master-2f7c8e0 https://github.com/ggerganov/llama.cpp/releases/tag/master-2f7c8e0 sources = [ GitSource("https://github.com/ggerganov/llama.cpp.git", From 4781e89476ea5c060da547442ee1e2309b515744 Mon Sep 17 00:00:00 2001 From: Marco Matthies <71844+marcom@users.noreply.github.com> Date: Sun, 16 Apr 2023 16:52:55 +0200 Subject: [PATCH 3/5] Remove patch that is now included upstream --- .../patches/fix-mingw32-windows-include.patch | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 L/llama_cpp/bundled/patches/fix-mingw32-windows-include.patch diff --git a/L/llama_cpp/bundled/patches/fix-mingw32-windows-include.patch b/L/llama_cpp/bundled/patches/fix-mingw32-windows-include.patch deleted file mode 100644 index 8d79cd46d17..00000000000 --- a/L/llama_cpp/bundled/patches/fix-mingw32-windows-include.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/llama.cpp b/llama.cpp -index 854bb89..78cf939 100644 ---- a/llama.cpp -+++ b/llama.cpp -@@ -14,7 +14,7 @@ - - #if defined(_WIN32) && !defined(_POSIX_MAPPED_FILES) - #define WIN32_LEAN_AND_MEAN --#include -+#include - #else - #include - #include From d19d7a509812bccee9665a414bde2907da059e4c Mon Sep 17 00:00:00 2001 From: Marco Matthies <71844+marcom@users.noreply.github.com> Date: Sun, 16 Apr 2023 17:44:43 +0200 Subject: [PATCH 4/5] Bump version, remove obsolete patch --- L/llama_cpp/build_tarballs.jl | 6 ++---- .../bundled/patches/windows-add-ctime-include.patch | 12 ------------ 2 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 L/llama_cpp/bundled/patches/windows-add-ctime-include.patch diff --git a/L/llama_cpp/build_tarballs.jl b/L/llama_cpp/build_tarballs.jl index 421c751b44c..f29cb4464cc 100644 --- a/L/llama_cpp/build_tarballs.jl +++ b/L/llama_cpp/build_tarballs.jl @@ -18,11 +18,11 @@ version = v"0.0.6" # fake version number # 0.0.4 25.03.2023 master-1972616 https://github.com/ggerganov/llama.cpp/releases/tag/master-1972616 # 0.0.5 30.03.2023 master-3bcc129 https://github.com/ggerganov/llama.cpp/releases/tag/master-3bcc129 # 0.0.6 03.04.2023 master-437e778 https://github.com/ggerganov/llama.cpp/releases/tag/master-437e778 -# 0.0.7 15.04.2023 master-2f7c8e0 https://github.com/ggerganov/llama.cpp/releases/tag/master-2f7c8e0 +# 0.0.7 16.04.2023 master-3173a62 https://github.com/ggerganov/llama.cpp/releases/tag/master-3173a62 sources = [ GitSource("https://github.com/ggerganov/llama.cpp.git", - "2f7c8e014e3c0ceaf39688845c2ff6f919fb03b7"), + "3173a62eb9f90b94fb3184131032c1c8b7aa8d86"), DirectorySource("./bundled"), ] @@ -31,8 +31,6 @@ cd $WORKSPACE/srcdir/llama.cpp* # remove -march=native from cmake files atomic_patch -p1 ../patches/cmake-remove-mcpu-native.patch -# add missing ctime include to fix compilation on windows -atomic_patch -p1 ../patches/windows-add-ctime-include.patch EXTRA_CMAKE_ARGS= if [[ "${target}" == *-linux-* ]]; then diff --git a/L/llama_cpp/bundled/patches/windows-add-ctime-include.patch b/L/llama_cpp/bundled/patches/windows-add-ctime-include.patch deleted file mode 100644 index d4d74ce1c4d..00000000000 --- a/L/llama_cpp/bundled/patches/windows-add-ctime-include.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/llama.cpp b/llama.cpp -index be8c4cd..1552d60 100644 ---- a/llama.cpp -+++ b/llama.cpp -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - - #define LLAMA_USE_SCRATCH - #define LLAMA_MAX_SCRATCH_BUFFERS 16 From f25aa86017d1b1d17f8f7721905962141346406a Mon Sep 17 00:00:00 2001 From: Marco Matthies <71844+marcom@users.noreply.github.com> Date: Sun, 16 Apr 2023 21:56:54 +0200 Subject: [PATCH 5/5] Bump version --- L/llama_cpp/build_tarballs.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/L/llama_cpp/build_tarballs.jl b/L/llama_cpp/build_tarballs.jl index f29cb4464cc..da03602821c 100644 --- a/L/llama_cpp/build_tarballs.jl +++ b/L/llama_cpp/build_tarballs.jl @@ -18,11 +18,11 @@ version = v"0.0.6" # fake version number # 0.0.4 25.03.2023 master-1972616 https://github.com/ggerganov/llama.cpp/releases/tag/master-1972616 # 0.0.5 30.03.2023 master-3bcc129 https://github.com/ggerganov/llama.cpp/releases/tag/master-3bcc129 # 0.0.6 03.04.2023 master-437e778 https://github.com/ggerganov/llama.cpp/releases/tag/master-437e778 -# 0.0.7 16.04.2023 master-3173a62 https://github.com/ggerganov/llama.cpp/releases/tag/master-3173a62 +# 0.0.7 16.04.2023 master-47f61aa https://github.com/ggerganov/llama.cpp/releases/tag/master-47f61aa sources = [ GitSource("https://github.com/ggerganov/llama.cpp.git", - "3173a62eb9f90b94fb3184131032c1c8b7aa8d86"), + "47f61aaa5f76d04286792e2fbd0c95b659ab2af0"), DirectorySource("./bundled"), ]