]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
scripts : do not sync commits from this repo
authorGeorgi Gerganov <redacted>
Fri, 29 Dec 2023 13:00:46 +0000 (15:00 +0200)
committerGeorgi Gerganov <redacted>
Fri, 29 Dec 2023 13:03:08 +0000 (15:03 +0200)
extra/sync-ggml-am.sh
extra/sync-ggml.last

index 48be256c51bddeeab9c907e06f9c512773fa46d4..0b8e55ac07c4997b00af878b2794b34ec8f67f46 100755 (executable)
@@ -27,21 +27,36 @@ echo "Syncing ggml changes since commit $lc"
 cd $SRC_GGML
 
 git log --oneline $lc..HEAD
+git log --oneline $lc..HEAD | grep -v "(whisper/[0-9]*)" | cut -d' ' -f1 > $SRC_WHISPER/ggml-commits
 
-git format-patch $lc --stdout -- \
-    include/ggml/ggml*.h \
-    src/ggml*.h \
-    src/ggml*.c \
-    src/ggml*.cpp \
-    src/ggml*.m \
-    src/ggml*.metal \
-    src/ggml*.cu \
-    tests/test-opt.cpp \
-    tests/test-grad0.cpp \
-    tests/test-quantize-fns.cpp \
-    tests/test-quantize-perf.cpp \
-    tests/test-backend-ops.cpp \
-    > $SRC_WHISPER/ggml-src.patch
+if [ ! -s $SRC_WHISPER/ggml-commits ]; then
+    rm -v $SRC_WHISPER/ggml-commits
+    echo "No new commits"
+    exit 0
+fi
+
+if [ -f $SRC_WHISPER/ggml-src.patch ]; then
+    rm -v $SRC_WHISPER/ggml-src.patch
+fi
+
+while read c; do
+    git format-patch -k $c~1..$c --stdout -- \
+        include/ggml/ggml*.h \
+        src/ggml*.h \
+        src/ggml*.c \
+        src/ggml*.cpp \
+        src/ggml*.m \
+        src/ggml*.metal \
+        src/ggml*.cu \
+        tests/test-opt.cpp \
+        tests/test-grad0.cpp \
+        tests/test-quantize-fns.cpp \
+        tests/test-quantize-perf.cpp \
+        tests/test-backend-ops.cpp \
+        >> $SRC_WHISPER/ggml-src.patch
+done < $SRC_WHISPER/ggml-commits
+
+rm -v $SRC_WHISPER/ggml-commits
 
 # delete files if empty
 if [ ! -s $SRC_WHISPER/ggml-src.patch ]; then
index 3b196fa5843e4d4a9a08d0feac84852b04efe31f..9166e0fa3d880283133c124435749ba5306f0426 100644 (file)
@@ -1 +1 @@
-1467a4eb71bdb5ac316d248a7f3f26cdadc56b68
+965137f49917768959679a9e860dc414e170fd55