From 50caee3467aada77a4b442a0da8336c6937d6c98 Mon Sep 17 00:00:00 2001 From: ciricc Date: Sat, 20 Sep 2025 16:31:45 +0300 Subject: [PATCH] doc: benchmark step by step doc --- bindings/go/README.md | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/bindings/go/README.md b/bindings/go/README.md index c796b77f0..c6de0b979 100644 --- a/bindings/go/README.md +++ b/bindings/go/README.md @@ -207,35 +207,11 @@ make examples # optionally: ./build/go-model-download -out models ``` -### Run CPU benchmarks +### Run benchmarks ```bash cd bindings/go/pkg/whisper -go test -bench=ContextProcessCPU -benchmem -run=^$ . -go test -bench=ContextProcessBigCPU -benchmem -run=^$ . -# or run all -go test -bench=. -benchmem -run=^$ . -``` - -### Run GPU benchmarks - -GPU runs toggle `UseGPU` in model params. Ensure your build has GPU backends enabled: - -- CUDA: build the C libs with CUDA - -```bash -cd bindings/go -GGML_CUDA=1 make whisper -``` - -- macOS Metal: supported by default in the build flags on Darwin. - -Then run: - -```bash -cd bindings/go/pkg/whisper -go test -bench=ContextProcessGPU -benchmem -run=^$ . -go test -bench=ContextProcessBigGPU -benchmem -run=^$ . +make benchmark ``` ### What the benchmarks measure