From ccbe9d567694d0ab8ce4eb8c5a9bad51b45061b1 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sun, 7 Apr 2024 17:04:22 +0300 Subject: [PATCH] extra : sync grammar-parser --- extra/sync-ggml-am.sh | 14 ++++++++++---- extra/sync-ggml.sh | 10 ++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/extra/sync-ggml-am.sh b/extra/sync-ggml-am.sh index 61191be7..dc4be9bd 100755 --- a/extra/sync-ggml-am.sh +++ b/extra/sync-ggml-am.sh @@ -65,6 +65,8 @@ while read c; do examples/common.cpp \ examples/common-ggml.h \ examples/common-ggml.cpp \ + examples/whisper/grammar-parser.h \ + examples/whisper/grammar-parser.cpp \ examples/whisper/whisper.h \ examples/whisper/whisper.cpp \ examples/whisper/main.cpp \ @@ -121,10 +123,12 @@ if [ -f $SRC_WHISPER/ggml-src.patch ]; then # include/ggml/ggml-alloc.h -> ggml-alloc.h # include/ggml/ggml-backend.h -> ggml-backend.h # - # examples/common.h -> examples/common.h - # examples/common.cpp -> examples/common.cpp - # examples/common-ggml.h -> examples/common-ggml.h - # examples/common-ggml.cpp -> examples/common-ggml.cpp + # examples/common.h -> examples/common.h + # examples/common.cpp -> examples/common.cpp + # examples/common-ggml.h -> examples/common-ggml.h + # examples/common-ggml.cpp -> examples/common-ggml.cpp + # examples/whisper/grammar-parser.h -> examples/grammar-parser.h + # examples/whisper/grammar-parser.cpp -> examples/grammar-parser.cpp # # examples/whisper/whisper.h -> whisper.h # examples/whisper/whisper.cpp -> whisper.cpp @@ -162,6 +166,8 @@ if [ -f $SRC_WHISPER/ggml-src.patch ]; then -e 's/examples\/common\.cpp/examples\/common.cpp/g' \ -e 's/examples\/common-ggml\.h/examples\/common-ggml.h/g' \ -e 's/examples\/common-ggml\.cpp/examples\/common-ggml.cpp/g' \ + -e 's/examples\/whisper\/grammar-parser\.h/examples\/grammar-parser.h/g' \ + -e 's/examples\/whisper\/grammar-parser\.cpp/examples\/grammar-parser.cpp/g' \ -e 's/examples\/whisper\/whisper\.h/whisper.h/g' \ -e 's/examples\/whisper\/whisper\.cpp/whisper.cpp/g' \ -e 's/examples\/whisper\/main\.cpp/examples\/main\/main.cpp/g' \ diff --git a/extra/sync-ggml.sh b/extra/sync-ggml.sh index 3fc26787..1482cfbc 100755 --- a/extra/sync-ggml.sh +++ b/extra/sync-ggml.sh @@ -29,10 +29,12 @@ cp -rpv ../ggml/include/ggml/ggml.h ./ggml.h cp -rpv ../ggml/include/ggml/ggml-alloc.h ./ggml-alloc.h cp -rpv ../ggml/include/ggml/ggml-backend.h ./ggml-backend.h -cp -rpv ../ggml/examples/common.h ./examples/common.h -cp -rpv ../ggml/examples/common.cpp ./examples/common.cpp -cp -rpv ../ggml/examples/common-ggml.h ./examples/common-ggml.h -cp -rpv ../ggml/examples/common-ggml.cpp ./examples/common-ggml.cpp +cp -rpv ../ggml/examples/common.h ./examples/common.h +cp -rpv ../ggml/examples/common.cpp ./examples/common.cpp +cp -rpv ../ggml/examples/common-ggml.h ./examples/common-ggml.h +cp -rpv ../ggml/examples/common-ggml.cpp ./examples/common-ggml.cpp +cp -rpv ../ggml/examples/whisper/grammar-parser.h ./examples/grammar-parser.h +cp -rpv ../ggml/examples/whisper/grammar-parser.cpp ./examples/grammar-parser.cpp cp -rpv ../ggml/examples/whisper/whisper.h ./whisper.h cp -rpv ../ggml/examples/whisper/whisper.cpp ./whisper.cpp