File tree Expand file tree Collapse file tree 1 file changed +30
-16
lines changed Expand file tree Collapse file tree 1 file changed +30
-16
lines changed Original file line number Diff line number Diff line change @@ -26,22 +26,36 @@ echo "Syncing ggml changes since commit $lc"
26
26
27
27
cd $SRC_GGML
28
28
29
- git log --oneline $lc ..HEAD
30
-
31
- git format-patch $lc --stdout -- \
32
- include/ggml/ggml* .h \
33
- src/ggml* .h \
34
- src/ggml* .c \
35
- src/ggml* .cpp \
36
- src/ggml* .m \
37
- src/ggml* .metal \
38
- src/ggml* .cu \
39
- tests/test-opt.cpp \
40
- tests/test-grad0.cpp \
41
- tests/test-quantize-fns.cpp \
42
- tests/test-quantize-perf.cpp \
43
- tests/test-backend-ops.cpp \
44
- > $SRC_LLAMA /ggml-src.patch
29
+ git log --oneline $lc ..HEAD | grep -v " (llama/[0-9]*)" | cut -d' ' -f1 > $SRC_LLAMA /ggml-commits
30
+
31
+ if [ ! -s $SRC_LLAMA /ggml-commits ]; then
32
+ rm -v $SRC_LLAMA /ggml-commits
33
+ echo " No new commits"
34
+ exit 0
35
+ fi
36
+
37
+ if [ -f $SRC_LLAMA /ggml-src.patch ]; then
38
+ rm -v $SRC_LLAMA /ggml-src.patch
39
+ fi
40
+
41
+ while read c; do
42
+ git format-patch -k $c ~1..$c --stdout -- \
43
+ include/ggml/ggml* .h \
44
+ src/ggml* .h \
45
+ src/ggml* .c \
46
+ src/ggml* .cpp \
47
+ src/ggml* .m \
48
+ src/ggml* .metal \
49
+ src/ggml* .cu \
50
+ tests/test-opt.cpp \
51
+ tests/test-grad0.cpp \
52
+ tests/test-quantize-fns.cpp \
53
+ tests/test-quantize-perf.cpp \
54
+ tests/test-backend-ops.cpp \
55
+ >> $SRC_LLAMA /ggml-src.patch
56
+ done < $SRC_LLAMA /ggml-commits
57
+
58
+ rm -v $SRC_LLAMA /ggml-commits
45
59
46
60
# delete files if empty
47
61
if [ ! -s $SRC_LLAMA /ggml-src.patch ]; then
You can’t perform that action at this time.
0 commit comments