Some checks failed
Bindings Tests (Go) / ubuntu-22 (push) Failing after 31s
CI (sycl) / ubuntu-22-cmake-sycl (linux/arm/v7, icx, icpx, ON) (push) Failing after 3s
CI (sycl) / ubuntu-22-cmake-sycl (linux/ppc64le, icx, icpx, ON) (push) Failing after 2s
CI (sycl) / ubuntu-22-cmake-sycl-fp16 (linux/amd64, icx, icpx, ON) (push) Failing after 3s
CI (sycl) / ubuntu-22-cmake-sycl-fp16 (linux/arm/v7, icx, icpx, ON) (push) Failing after 3s
CI (sycl) / ubuntu-22-cmake-sycl-fp16 (linux/arm64, icx, icpx, ON) (push) Failing after 3s
CI (sycl) / ubuntu-22-cmake-sycl-fp16 (linux/ppc64le, icx, icpx, ON) (push) Failing after 3s
CI (vad) / vad (push) Failing after 3s
CI (wasm) / emscripten (Release) (push) Failing after 4s
Bindings Tests (Ruby) / ubuntu-22 (push) Failing after 37s
CI (android) / android (push) Failing after 16s
CI (android) / android_java (push) Failing after 3s
CI (clang) / ubuntu-22-clang (linux/amd64, Debug) (push) Failing after 3s
CI (clang) / ubuntu-22-clang (linux/amd64, Release) (push) Failing after 2s
CI (clang) / ubuntu-22-clang (linux/ppc64le, Debug) (push) Failing after 3s
CI (clang) / ubuntu-22-clang (linux/ppc64le, Release) (push) Failing after 3s
CI (cpu) / ggml-ci-x64-cpu-low-perf (push) Failing after 3s
CI (cpu) / ggml-ci-x64-cpu-high-perf (push) Failing after 2s
CI (gcc) / ubuntu-22-gcc (linux/amd64, Debug) (push) Failing after 3s
CI (gcc) / ubuntu-22-gcc (linux/amd64, Release) (push) Failing after 3s
CI (gcc) / ubuntu-22-gcc (linux/ppc64le, Debug) (push) Failing after 3s
CI (gcc) / ubuntu-22-gcc (linux/ppc64le, Release) (push) Failing after 4s
CI (gcc) / ubuntu-22-gcc-arm-v7 (linux/arm/v7, Debug) (push) Failing after 3s
CI (gcc) / ubuntu-22-gcc-arm-v7 (linux/arm/v7, Release) (push) Failing after 3s
CI (quantize) / quantize (push) Failing after 3s
CI (sanitize) / ubuntu-22-gcc-sanitized (ADDRESS) (push) Failing after 3s
CI (sanitize) / ubuntu-22-gcc-sanitized (THREAD) (push) Failing after 3s
CI (sanitize) / ubuntu-22-gcc-sanitized (UNDEFINED) (push) Failing after 2s
CI (sycl) / ubuntu-22-cmake-sycl (linux/amd64, icx, icpx, ON) (push) Failing after 3s
CI (sycl) / ubuntu-22-cmake-sycl (linux/arm64, icx, icpx, ON) (push) Failing after 3s
Examples WASM / deploy-wasm-github-pages (push) Failing after 3s
Examples Tests / addon_node-ubuntu-22 (20.x) (push) Failing after 3s
Examples Tests / addon_node-ubuntu-22 (22.x) (push) Failing after 2s
CI (coreml) / coreml-base-en (push) Has been cancelled
CI (self-hosted) / gpu-vulkan (push) Has been cancelled
CI (self-hosted) / npu-amd-windows (push) Has been cancelled
CI (self-hosted) / gpu-vulkan-nvidia-cm2 (push) Has been cancelled
CI (clang) / ubuntu-22-clang-arm64 (Debug) (push) Has been cancelled
CI (clang) / ubuntu-22-clang-arm64 (Release) (push) Has been cancelled
CI (self-hosted) / gpu-cuda (push) Has been cancelled
CI (self-hosted) / gpu-vulkan-nvidia-cm (push) Has been cancelled
CI (cpu) / ggml-ci-arm64-cpu-low-perf (push) Has been cancelled
CI (cpu) / ggml-ci-arm64-cpu-high-perf (push) Has been cancelled
CI (cpu) / ggml-ci-arm64-cpu-high-perf-sve (push) Has been cancelled
CI (freebsd) / freeBSD-latest (push) Has been cancelled
CI (self-hosted) / gpu-metal (push) Has been cancelled
CI (gcc) / ubuntu-22-gcc-arm64 (Debug) (push) Has been cancelled
CI (gcc) / ubuntu-22-gcc-arm64 (Release) (push) Has been cancelled
CI (macOS) / macOS-latest (generic/platform=iOS) (push) Has been cancelled
CI (macOS) / macOS-latest (generic/platform=macOS) (push) Has been cancelled
CI (macOS) / macOS-latest (generic/platform=tvOS) (push) Has been cancelled
CI (self-hosted) / npu-amd-linux (push) Has been cancelled
CI (windows) / windows-msys2 (Release, clang, clang-x86_64, CLANG64) (push) Has been cancelled
CI (windows) / windows-msys2 (Release, gcc, ucrt-x86_64, UCRT64) (push) Has been cancelled
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/main-cuda.Dockerfile platform:linux/amd64 runs_on:ubuntu-24.04 tag:main-cuda]) (push) Has been cancelled
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/main-intel.Dockerfile platform:linux/amd64 runs_on:ubuntu-24.04 tag:main-intel]) (push) Has been cancelled
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/main-musa.Dockerfile platform:linux/amd64 runs_on:ubuntu-24.04 tag:main-musa]) (push) Has been cancelled
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/main-vulkan.Dockerfile platform:linux/amd64 runs_on:ubuntu-24.04 tag:main-vulkan]) (push) Has been cancelled
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/main-vulkan.Dockerfile platform:linux/arm64 runs_on:ubuntu-24.04-arm tag:main-vulkan-arm64]) (push) Has been cancelled
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/main.Dockerfile platform:linux/amd64 runs_on:ubuntu-24.04 tag:main]) (push) Has been cancelled
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/main.Dockerfile platform:linux/arm64 runs_on:ubuntu-24.04-arm tag:main-arm64]) (push) Has been cancelled
Mark inactive issues stale / mark-issues (push) Failing after 1s
161 lines
4.6 KiB
Bash
Executable File
161 lines
4.6 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Synchronize ggml changes to whisper.cpp
|
|
#
|
|
# Usage:
|
|
#
|
|
# $ cd /path/to/whisper.cpp
|
|
# $ ./scripts/sync-ggml-am.sh -skip hash0,hash1,hash2...
|
|
#
|
|
|
|
set -e
|
|
|
|
sd=$(dirname $0)
|
|
cd $sd/../
|
|
|
|
SRC_WHISPER=$(pwd)
|
|
SRC_GGML=$(cd ../ggml; pwd)
|
|
|
|
if [ ! -d $SRC_GGML ]; then
|
|
echo "ggml not found at $SRC_GGML"
|
|
exit 1
|
|
fi
|
|
|
|
lc=$(cat $SRC_WHISPER/scripts/sync-ggml.last)
|
|
echo "Syncing ggml changes since commit $lc"
|
|
|
|
to_skip=""
|
|
|
|
# context for git patches in number of lines
|
|
ctx="8"
|
|
|
|
while [ "$1" != "" ]; do
|
|
case $1 in
|
|
-skip )
|
|
shift
|
|
to_skip=$1
|
|
;;
|
|
-C )
|
|
shift
|
|
ctx=$1
|
|
;;
|
|
esac
|
|
shift
|
|
done
|
|
|
|
cd $SRC_GGML
|
|
|
|
git log --oneline $lc..HEAD
|
|
git log --oneline $lc..HEAD --reverse | grep -v "(whisper/[0-9]*)" | cut -d' ' -f1 > $SRC_WHISPER/ggml-commits
|
|
|
|
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
|
|
if [ -n "$to_skip" ]; then
|
|
if [[ $to_skip == *"$c"* ]]; then
|
|
echo "Skipping $c"
|
|
continue
|
|
fi
|
|
fi
|
|
|
|
git format-patch -U${ctx} -k $c~1..$c --stdout -- \
|
|
CMakeLists.txt \
|
|
src/CMakeLists.txt \
|
|
cmake/BuildTypes.cmake \
|
|
cmake/GitVars.cmake \
|
|
cmake/common.cmake \
|
|
cmake/ggml-config.cmake.in \
|
|
src/ggml-cpu/cmake/FindSIMD.cmake \
|
|
src/ggml* \
|
|
src/gguf* \
|
|
include/ggml*.h \
|
|
include/gguf*.h \
|
|
examples/common.h \
|
|
examples/common.cpp \
|
|
examples/common-ggml.h \
|
|
examples/common-ggml.cpp \
|
|
LICENSE \
|
|
scripts/gen-authors.sh \
|
|
>> $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
|
|
rm -v $SRC_WHISPER/ggml-src.patch
|
|
fi
|
|
|
|
cd $SRC_WHISPER
|
|
|
|
if [ -f $SRC_WHISPER/ggml-src.patch ]; then
|
|
# replace PR numbers
|
|
#
|
|
# Subject: some text (#1234)
|
|
# Subject: some text (ggml/1234)
|
|
cat ggml-src.patch | sed -e 's/^Subject: \(.*\) (#\([0-9]*\))/Subject: \1 (ggml\/\2)/' > ggml-src.patch.tmp
|
|
mv ggml-src.patch.tmp ggml-src.patch
|
|
|
|
cat ggml-src.patch | sed -e 's/^\(.*\) (#\([0-9]*\))$/\1 (ggml\/\2)/' > ggml-src.patch.tmp
|
|
mv ggml-src.patch.tmp ggml-src.patch
|
|
|
|
# replace filenames:
|
|
#
|
|
# CMakelists.txt -> ggml/CMakeLists.txt
|
|
# src/CMakeLists.txt -> ggml/src/CMakeLists.txt
|
|
|
|
# cmake/BuildTypes.cmake -> ggml/cmake/BuildTypes.cmake
|
|
# cmake/GitVars.cmake -> ggml/cmake/GitVars.cmake
|
|
# cmake/common.cmake -> ggml/cmake/common.cmake
|
|
# cmake/ggml-config.cmake.in -> ggml/cmake/ggml-config.cmake.in
|
|
# src/ggml-cpu/cmake/FindSIMD.cmake -> ggml/src/ggml-cpu/cmake/FindSIMD.cmake
|
|
#
|
|
# src/ggml* -> ggml/src/ggml*
|
|
#
|
|
# include/ggml*.h -> ggml/include/ggml*.h
|
|
# include/gguf*.h -> ggml/include/gguf*.h
|
|
#
|
|
# tests/test*.cpp -> tests/
|
|
#
|
|
# LICENSE -> LICENSE
|
|
# scripts/gen-authors.sh -> scripts/gen-authors.sh
|
|
|
|
cat ggml-src.patch | sed -E \
|
|
-e 's/([[:space:]]| [ab]\/)CMakeLists.txt/\1ggml\/CMakeLists.txt/g' \
|
|
-e 's/([[:space:]]| [ab]\/)src\/CMakeLists.txt/\1ggml\/src\/CMakeLists.txt/g' \
|
|
-e 's/([[:space:]]| [ab]\/)cmake\/BuildTypes.cmake/\1ggml\/cmake\/BuildTypes.cmake/g' \
|
|
-e 's/([[:space:]]| [ab]\/)cmake\/GitVars.cmake/\1ggml\/cmake\/GitVars.cmake/g' \
|
|
-e 's/([[:space:]]| [ab]\/)cmake\/common.cmake/\1ggml\/cmake\/common.cmake/g' \
|
|
-e 's/([[:space:]]| [ab]\/)cmake\/ggml-config.cmake.in/\1ggml\/cmake\/ggml-config.cmake.in/g' \
|
|
-e 's/([[:space:]]| [ab]\/)src\/ggml-cpu\/cmake\/FindSIMD.cmake/\1ggml\/src\/ggml-cpu\/cmake\/FindSIMD.cmake/g' \
|
|
-e 's/([[:space:]]| [ab]\/)src\/ggml(.*)/\1ggml\/src\/ggml\2/g' \
|
|
-e 's/([[:space:]]| [ab]\/)src\/gguf(.*)/\1ggml\/src\/gguf\2/g' \
|
|
-e 's/([[:space:]]| [ab]\/)include\/ggml(.*)\.h/\1ggml\/include\/ggml\2.h/g' \
|
|
-e 's/([[:space:]]| [ab]\/)include\/gguf(.*)\.h/\1ggml\/include\/gguf\2.h/g' \
|
|
-e 's/([[:space:]]| [ab]\/)tests\/(.*)\.cpp/\1tests\/\2.cpp/g' \
|
|
-e 's/([[:space:]]| [ab]\/)LICENSE/\1LICENSE/g' \
|
|
-e 's/([[:space:]]| [ab]\/)scripts\/gen-authors\.sh/\1scripts\/gen-authors.sh/g' \
|
|
> ggml-src.patch.tmp
|
|
mv ggml-src.patch.tmp ggml-src.patch
|
|
|
|
git am ggml-src.patch
|
|
|
|
rm -v $SRC_WHISPER/ggml-src.patch
|
|
fi
|
|
|
|
# update last commit
|
|
cd $SRC_GGML
|
|
git log -1 --format=%H > $SRC_WHISPER/scripts/sync-ggml.last
|
|
|
|
echo "Done"
|
|
|
|
exit 0
|