Skip to content

Commit 5f9729d

Browse files
committed
Merge tag 'v1.7.2'
* tag 'v1.7.2': (285 commits) release : v1.7.2 sycl: fix example build (ggml-org#2570) ci : use local ggml in Android build (ggml-org#2567) ggml : tmp workaround for whisper.cpp (skip) (ggml-org#2565) update : readme scripts : fix sync path whisper.swiftui : switch Mac dest to Mac (Designed for iPad) (ggml-org#2562) cmake : fix ppc64 check (#0) whisper : include ggml-cpu.h (#0) build : fixes talk-llama : sync llama.cpp whisper : fix build (#0) sync : ggml sycl : Fixes to broken builds and test-backend-ops (llama/10257) vulkan: Optimize contiguous copies (llama/10254) vulkan: Throttle the number of shader compiles during the build step. (llama/10222) metal : more precise Q*K in FA vec kernel (llama/10247) vulkan: Fix newly added tests for permuted mul_mat and 1D im2col (llama/10226) metal : reorder write loop in mul mat kernel + style (llama/10231) metal : fix build and some more comments (llama/10229) ...
2 parents 2ca527c + 6266a9f commit 5f9729d

File tree

267 files changed

+64469
-205329
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

267 files changed

+64469
-205329
lines changed

.devops/cublas.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ FROM ${BASE_CUDA_DEV_CONTAINER} as build
1212
ARG CUDA_DOCKER_ARCH=all
1313

1414
RUN apt-get update && \
15-
apt-get install -y build-essential git cmake
15+
apt-get install -y build-essential git cmake libsdl2-dev
1616

1717
WORKDIR /app
1818

.devops/main-cuda.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ENV CUDA_DOCKER_ARCH=${CUDA_DOCKER_ARCH}
1717
ENV GGML_CUDA=1
1818

1919
RUN apt-get update && \
20-
apt-get install -y build-essential \
20+
apt-get install -y build-essential libsdl2-dev \
2121
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
2222

2323
# Ref: https://stackoverflow.com/a/53464012

.devops/main.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ FROM ubuntu:22.04 AS runtime
1212
WORKDIR /app
1313

1414
RUN apt-get update && \
15-
apt-get install -y curl ffmpeg \
15+
apt-get install -y curl ffmpeg libsdl2-dev \
1616
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
1717

1818
COPY --from=build /app /app

.github/workflows/bindings-go.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
ubuntu-latest:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/setup-go@v3
16+
- uses: actions/setup-go@v5
1717
with:
18-
go-version: '^1.19'
19-
- uses: actions/checkout@v1
18+
go-version: '^1.23'
19+
- uses: actions/checkout@v4
2020
- run: |
2121
cd bindings/go
2222
make test
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Bindings Tests (Ruby)
2+
on:
3+
push:
4+
paths:
5+
- bindings/ruby/**
6+
- src/whisper.cpp
7+
- include/whisper.h
8+
- ggml/src/ggml.c
9+
- ggml/src/ggml-impl.h
10+
- ggml/src/ggml-aarch64.h
11+
- ggml/src/ggml-aarch64.c
12+
- ggml/src/ggml-alloc.c
13+
- ggml/src/ggml-backend-impl.h
14+
- ggml/src/ggml-backend.cpp
15+
- ggml/src/ggml-common.h
16+
- ggml/src/ggml-quants.h
17+
- ggml/src/ggml-quants.c
18+
- ggml/src/ggml-cpu-impl.h
19+
- ggml/src/ggml-metal.m
20+
- ggml/src/ggml-metal.metal
21+
- ggml/src/ggml-blas.cpp
22+
- ggml/include/ggml.h
23+
- ggml/include/ggml-alloc.h
24+
- ggml/include/ggml-backend.h
25+
- ggml/include/ggml-cuda.h
26+
- ggml/include/ggml-kompute.h
27+
- ggml/include/ggml-metal.h
28+
- ggml/include/ggml-sycl.h
29+
- ggml/include/ggml-vulkan.h
30+
- ggml/include/ggml-blas.h
31+
- scripts/get-flags.mk
32+
- examples/dr_wav.h
33+
pull_request:
34+
paths:
35+
- bindings/ruby/**
36+
- src/whisper.cpp
37+
- include/whisper.h
38+
- ggml/src/ggml.c
39+
- ggml/src/ggml-impl.h
40+
- ggml/src/ggml-aarch64.h
41+
- ggml/src/ggml-aarch64.c
42+
- ggml/src/ggml-alloc.c
43+
- ggml/src/ggml-backend-impl.h
44+
- ggml/src/ggml-backend.cpp
45+
- ggml/src/ggml-common.h
46+
- ggml/src/ggml-quants.h
47+
- ggml/src/ggml-quants.c
48+
- ggml/src/ggml-cpu-impl.h
49+
- ggml/src/ggml-metal.m
50+
- ggml/src/ggml-metal.metal
51+
- ggml/src/ggml-blas.cpp
52+
- ggml/include/ggml.h
53+
- ggml/include/ggml-alloc.h
54+
- ggml/include/ggml-backend.h
55+
- ggml/include/ggml-cuda.h
56+
- ggml/include/ggml-kompute.h
57+
- ggml/include/ggml-metal.h
58+
- ggml/include/ggml-sycl.h
59+
- ggml/include/ggml-vulkan.h
60+
- ggml/include/ggml-blas.h
61+
- scripts/get-flags.mk
62+
- examples/dr_wav.h
63+
64+
jobs:
65+
ubuntu-latest:
66+
runs-on: ubuntu-latest
67+
defaults:
68+
run:
69+
working-directory: bindings/ruby
70+
steps:
71+
- uses: ruby/setup-ruby@v1
72+
with:
73+
ruby-version: '3.0'
74+
- uses: actions/checkout@v4
75+
- run: rake test

.github/workflows/bindings-ruby.yml.disabled

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on: [push, pull_request]
33

44
env:
55
ubuntu_image: "ubuntu:22.04"
6+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
67

78
jobs:
89
ubuntu-latest:
@@ -308,7 +309,7 @@ jobs:
308309
- name: Build using CMake w/ OpenBLAS
309310
shell: msys2 {0}
310311
run: |
311-
cmake -B build -DGGML_OPENBLAS=ON
312+
cmake -B build -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS
312313
cmake --build build --config ${{ matrix.build }} -j $(nproc)
313314
314315
windows:
@@ -382,10 +383,8 @@ jobs:
382383
sdl2: [ON]
383384
include:
384385
- arch: Win32
385-
obzip: https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.25/OpenBLAS-0.3.25-x86.zip
386386
s2arc: x86
387387
- arch: x64
388-
obzip: https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.25/OpenBLAS-0.3.25-x64.zip
389388
s2arc: x64
390389
- sdl2: ON
391390
s2ver: 2.28.5
@@ -394,17 +393,21 @@ jobs:
394393
- name: Clone
395394
uses: actions/checkout@v4
396395

396+
- name: Export GitHub Actions cache environment variables
397+
uses: actions/github-script@v7
398+
with:
399+
script: |
400+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
401+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
402+
397403
- name: Add msbuild to PATH
398404
uses: microsoft/setup-msbuild@v2
399405

400-
- name: Fetch OpenBLAS
406+
- name: Install OpenBLAS and pkgconfiglite
401407
if: matrix.blas == 'ON'
402408
run: |
403-
C:/msys64/usr/bin/wget.exe -qO blas.zip ${{ matrix.obzip }}
404-
7z x blas.zip -oblas -y
405-
copy blas/include/cblas.h .
406-
copy blas/include/openblas_config.h .
407-
echo "OPENBLAS_PATH=$env:GITHUB_WORKSPACE/blas" >> $env:GITHUB_ENV
409+
vcpkg install --triplet=${{ matrix.s2arc }}-windows openblas
410+
choco install pkgconfiglite
408411
409412
- name: Fetch SDL2 and set SDL2_DIR
410413
if: matrix.sdl2 == 'ON'
@@ -416,19 +419,20 @@ jobs:
416419
- name: Configure
417420
run: >
418421
cmake -S . -B ./build -A ${{ matrix.arch }}
422+
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
419423
-DCMAKE_BUILD_TYPE=${{ matrix.build }}
420-
-DGGML_OPENBLAS=${{ matrix.blas }}
421-
-DCMAKE_LIBRARY_PATH="$env:OPENBLAS_PATH/lib"
424+
-DGGML_BLAS=${{ matrix.blas }}
425+
-DGGML_BLAS_VENDOR=OpenBLAS
422426
-DWHISPER_SDL2=${{ matrix.sdl2 }}
423427
424428
- name: Build
425429
run: |
426430
cd ./build
427431
msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
428432
429-
- name: Copy libopenblas.dll
433+
- name: Copy openblas.dll
430434
if: matrix.blas == 'ON'
431-
run: copy "$env:OPENBLAS_PATH/bin/libopenblas.dll" build/bin/${{ matrix.build }}
435+
run: copy "C:/vcpkg/packages/openblas_${{ matrix.s2arc }}-windows/bin/openblas.dll" build/bin/${{ matrix.build }}
432436

433437
- name: Copy SDL2.dll
434438
if: matrix.sdl2 == 'ON'
@@ -560,12 +564,6 @@ jobs:
560564
with:
561565
path: whisper
562566

563-
- name: Clone
564-
uses: actions/checkout@v4
565-
with:
566-
repository: ggerganov/ggml
567-
path: ggml
568-
569567
- name: Install Java
570568
uses: actions/setup-java@v4
571569
with:
@@ -584,32 +582,33 @@ jobs:
584582
run: |
585583
export PATH_TO_GGML=$PWD/ggml
586584
cd whisper/examples/whisper.android
587-
./gradlew assembleRelease --no-daemon -PGGML_HOME=$PATH_TO_GGML
588-
589-
android_java:
590-
runs-on: ubuntu-latest
591-
592-
steps:
593-
- name: Clone
594-
uses: actions/checkout@v4
595-
596-
- name: set up JDK 11
597-
uses: actions/setup-java@v4
598-
with:
599-
java-version: '11'
600-
distribution: 'temurin'
601-
cache: gradle
602-
603-
- name: Setup Android SDK
604-
uses: android-actions/setup-android@v3
605-
with:
606-
cmdline-tools-version: 9.0
585+
./gradlew assembleRelease --no-daemon
607586
608-
- name: Build
609-
run: |
610-
cd examples/whisper.android.java
611-
chmod +x ./gradlew
612-
./gradlew assembleRelease
587+
# TODO: disable because of following fail: https://github.com/ggerganov/whisper.cpp/actions/runs/11019444420/job/30627193602
588+
# android_java:
589+
# runs-on: ubuntu-latest
590+
#
591+
# steps:
592+
# - name: Clone
593+
# uses: actions/checkout@v4
594+
#
595+
# - name: set up JDK 11
596+
# uses: actions/setup-java@v4
597+
# with:
598+
# java-version: '11'
599+
# distribution: 'temurin'
600+
# cache: gradle
601+
#
602+
# - name: Setup Android SDK
603+
# uses: android-actions/setup-android@v3
604+
# with:
605+
# cmdline-tools-version: 9.0
606+
#
607+
# - name: Build
608+
# run: |
609+
# cd examples/whisper.android.java
610+
# chmod +x ./gradlew
611+
# ./gradlew assembleRelease
613612

614613
# TODO: disabled because of following fail: https://github.com/ggerganov/whisper.cpp/actions/runs/9686220096/job/26735899598
615614
# java:

.github/workflows/docker.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ jobs:
1818
matrix:
1919
config:
2020
- { tag: "main", dockerfile: ".devops/main.Dockerfile", platform: "linux/amd64,linux/arm64" }
21-
- { tag: "main-cuda", dockerfile: ".devops/main-cuda.Dockerfile", platform: "linux/amd64" }
21+
#TODO: the cuda image keeps failing - disable for now
22+
# https://github.com/ggerganov/whisper.cpp/actions/runs/11019444428/job/30602020339
23+
#- { tag: "main-cuda", dockerfile: ".devops/main-cuda.Dockerfile", platform: "linux/amd64" }
2224

2325
steps:
2426
- name: Check out the repo
@@ -43,7 +45,7 @@ jobs:
4345
with:
4446
context: .
4547
push: true
46-
platforms: ${{ matrix.config.platforms }}
48+
platforms: ${{ matrix.config.platform }}
4749
tags: "ghcr.io/${{ github.repository }}:${{ matrix.config.tag }}-${{ env.COMMIT_SHA }}"
4850
file: ${{ matrix.config.dockerfile }}
4951

@@ -52,6 +54,6 @@ jobs:
5254
with:
5355
context: .
5456
push: ${{ github.event_name == 'push' }}
55-
platforms: ${{ matrix.config.platforms }}
57+
platforms: ${{ matrix.config.platform }}
5658
tags: "ghcr.io/${{ github.repository }}:${{ matrix.config.tag }}"
5759
file: ${{ matrix.config.dockerfile }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
.cache/
44
.coreml/
55
.test/
6+
.venv/
67
.vs/
78
.vscode/
89
.DS_Store
910
.vimspector.json
1011
/CMakeSettings.json
12+
/talk-llama.dSYM/
1113

1214
build/
1315
build-*/

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.5) # for add_link_options and implicit target directories.
22
project("whisper.cpp" C CXX)
3-
project("whisper.cpp" VERSION 1.6.2)
3+
project("whisper.cpp" VERSION 1.7.2)
44
include(CheckIncludeFileCXX)
55

66
set(SOVERSION 1)

0 commit comments

Comments
 (0)