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
119 lines
3.8 KiB
Bash
Executable File
119 lines
3.8 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Helper script to run the bench tool on all models and print the results in share-able format
|
|
|
|
printf "Usage: ./scripts/bench-all.sh [n_threads] [encoder-only] [flash-attn]\n"
|
|
|
|
if [ -z "$1" ]; then
|
|
n_threads=4
|
|
else
|
|
n_threads=$1
|
|
fi
|
|
|
|
encoder_only=0
|
|
if [ -z "$2" ] || [ "$2" -eq 0 ]; then
|
|
encoder_only=0
|
|
else
|
|
encoder_only=$2
|
|
fi
|
|
|
|
fattn=""
|
|
if [ -z "$3" ] || [ "$3" -eq 0 ]; then
|
|
fattn="-nfa"
|
|
else
|
|
fattn="-fa"
|
|
fi
|
|
|
|
models=( \
|
|
"tiny" "tiny-q4_0" "tiny-q4_1" "tiny-q5_0" "tiny-q5_1" "tiny-q8_0" \
|
|
"base" "base-q4_0" "base-q4_1" "base-q5_0" "base-q5_1" "base-q8_0" \
|
|
"small" "small-q4_0" "small-q4_1" "small-q5_0" "small-q5_1" "small-q8_0" \
|
|
"medium" "medium-q4_0" "medium-q4_1" "medium-q5_0" "medium-q5_1" "medium-q8_0" "medium-dis" \
|
|
"large-v2" "large-v2-q4_0" "large-v2-q4_1" "large-v2-q5_0" "large-v2-q5_1" "large-v2-q8_0" "large-v2-dis" \
|
|
"large-v3-turbo" "large-v3-turbo-q5_0" "large-v3-turbo-q8_0" \
|
|
)
|
|
|
|
if [ "$encoder_only" -eq 0 ]; then
|
|
printf "\n"
|
|
printf "Running memcpy benchmark\n"
|
|
printf "\n"
|
|
|
|
./build/bin/whisper-bench -w 1 -t $n_threads 2>&1
|
|
|
|
printf "\n"
|
|
printf "Running ggml_mul_mat benchmark with $n_threads threads\n"
|
|
printf "\n"
|
|
|
|
./build/bin/whisper-bench -w 2 -t $n_threads 2>&1
|
|
|
|
printf "\n"
|
|
printf "Running benchmark for all models\n"
|
|
printf "This can take a while!\n"
|
|
printf "\n"
|
|
fi
|
|
|
|
if [ "$fattn" == "-fa" ]; then
|
|
fattn_i=1
|
|
else
|
|
fattn_i=0
|
|
fi
|
|
|
|
printf "| %6s | %6s | %16s | %13s | %3s | %3s | %7s | %7s | %7s | %7s | %7s |\n" "CPU" "OS" "Config" "Model" "Th" "FA" "Enc." "Dec." "Bch5" "PP" "Commit"
|
|
printf "| %6s | %6s | %16s | %13s | %3s | %3s | %7s | %7s | %7s | %7s | %7s |\n" "---" "---" "---" "---" "---" "---" "---" "---" "---" "---" "---"
|
|
|
|
for model in "${models[@]}"; do
|
|
# actual run
|
|
# store stderr output in a variable in order to parse it later
|
|
output=$(./build/bin/whisper-bench -m ./models/ggml-$model.bin -t $n_threads $fattn 2>&1)
|
|
ret=$?
|
|
|
|
# parse the output:
|
|
encode_time=$(echo "$output" | grep "encode time" | awk '{print $11}')
|
|
decode_time=$(echo "$output" | grep "decode time" | awk '{print $11}')
|
|
batchd_time=$(echo "$output" | grep "batchd time" | awk '{print $11}')
|
|
prompt_time=$(echo "$output" | grep "prompt time" | awk '{print $11}')
|
|
system_info=$(echo "$output" | grep "system_info")
|
|
n_threads=$(echo "$output" | grep "system_info" | awk '{print $4}')
|
|
|
|
# floor to milliseconds
|
|
#encode_time=${encode_time%.*}
|
|
#decode_time=${decode_time%.*}
|
|
#prompt_time=${prompt_time%.*}
|
|
|
|
config=""
|
|
|
|
if [[ $system_info == *"AVX2 = 1"* ]]; then
|
|
config="$config AVX2"
|
|
fi
|
|
|
|
if [[ $system_info == *"NEON = 1"* ]]; then
|
|
config="$config NEON"
|
|
fi
|
|
|
|
if [[ $system_info == *"BLAS = 1"* ]]; then
|
|
config="$config BLAS"
|
|
fi
|
|
|
|
if [[ $system_info == *"COREML = 1"* ]]; then
|
|
config="$config COREML"
|
|
fi
|
|
|
|
if [[ $system_info == *"CUDA = 1"* ]]; then
|
|
config="$config CUDA"
|
|
elif [[ $system_info == *"CUDA : ARCHS"* ]]; then
|
|
config="$config CUDA"
|
|
fi
|
|
|
|
if [[ $system_info == *"MTL = 1"* ]]; then
|
|
config="$config MTL"
|
|
elif [[ $system_info == *"MTL : EMBED_LIBRARY = 1"* ]]; then
|
|
config="$config MTL"
|
|
fi
|
|
|
|
commit=$(git rev-parse --short HEAD)
|
|
|
|
if [ $ret -eq 0 ]; then
|
|
printf "| <todo> | <todo> | %16s | %13s | %3s | %3s | %7s | %7s | %7s | %7s | %7s |\n" "$config" "$model" "$n_threads" "$fattn_i" "$encode_time" "$decode_time" "$batchd_time" "$prompt_time" "$commit"
|
|
fi
|
|
done
|