Skip to content

Commit 2ca527c

Browse files
committed
Merge remote-tracking branch 'ggerganov/master'
* ggerganov/master: (118 commits) cann : add Ascend NPU support (ggml-org#2336) whisper : fix compile warning (#0) sync : ggml ggml : add CANN backend (llama/0) scripts : sync cann ci : disable ruby workflow (#0) ci : try to fix FreeBSD (#0) build : fix aarch64 (#0) talk-llama : sync llama.cpp sync : ggml ggml-backend : fix async copy from CPU (llama/8897) Updated SYCL device filtering (llama/8901) CUDA/HIP: fix tests/test-backend-ops (llama/8896) CUDA: fix padding logic for FP16/FP32 (llama/8884) ggml : add epsilon as a parameter for group_norm (llama/8818) ggml : fix overflows in elu function (llama/8866) ggml : reading the runtime sve config of the cpu (llama/8709) Fix conversion of unnormalized BF16->BF16 weights (llama/7843) Fixing wrong VDR iq4nl value (llama/8812) ggml-cuda: Adding support for unified memory (llama/8035) ...
2 parents 482718f + 81c999f commit 2ca527c

File tree

427 files changed

+202911
-28578
lines changed

Some content is hidden

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

427 files changed

+202911
-28578
lines changed

.devops/cublas.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ COPY . .
2121
# Set nvcc architecture
2222
ENV CUDA_DOCKER_ARCH=${CUDA_DOCKER_ARCH}
2323
# Enable cuBLAS
24-
ENV WHISPER_CUBLAS=1
24+
ENV GGML_CUDA=1
2525

2626
RUN make
2727

.devops/main-cuda.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ARG CUDA_DOCKER_ARCH=all
1414
# Set nvcc architecture
1515
ENV CUDA_DOCKER_ARCH=${CUDA_DOCKER_ARCH}
1616
# Enable cuBLAS
17-
ENV WHISPER_CUBLAS=1
17+
ENV GGML_CUDA=1
1818

1919
RUN apt-get update && \
2020
apt-get install -y build-essential \

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# TODO: fix this workflow file, disabled for now
12
name: Bindings Tests (Ruby)
23
on:
34
push:

.github/workflows/build.yml

Lines changed: 55 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
uses: cross-platform-actions/action@v0.24.0
6060
with:
6161
operating_system: freebsd
62-
version: '13.2'
62+
version: '13.3'
6363
run: |
6464
sudo pkg update
6565
sudo pkg install -y gmake sdl2
@@ -101,7 +101,10 @@ jobs:
101101
fail-fast: false
102102
matrix:
103103
build: [Debug, Release]
104-
arch: [linux/amd64, linux/arm64, linux/arm/v7, linux/ppc64le]
104+
#arch: [linux/amd64, linux/arm64, linux/arm/v7, linux/ppc64le]
105+
# TODO: arm/v7 disabled due to clang bug
106+
# https://github.com/ggerganov/whisper.cpp/actions/runs/9657764109/job/26637633042?pr=2256#step:4:1990
107+
arch: [linux/amd64, linux/arm64, linux/ppc64le]
105108

106109
steps:
107110
- name: Clone
@@ -197,7 +200,7 @@ jobs:
197200
source /opt/intel/oneapi/setvars.sh
198201
mkdir build
199202
cd build
200-
cmake -DWHISPER_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx ..
203+
cmake -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx ..
201204
cmake --build . --config Release -j $(nproc)
202205
203206
ubuntu-22-cmake-sycl-fp16:
@@ -247,7 +250,7 @@ jobs:
247250
source /opt/intel/oneapi/setvars.sh
248251
mkdir build
249252
cd build
250-
cmake -DWHISPER_SYCL_F16=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx ..
253+
cmake -DGGML_SYCL_F16=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx ..
251254
cmake --build . --config Release -j $(nproc)
252255
253256
windows-msys2:
@@ -289,7 +292,7 @@ jobs:
289292
- name: Build using make w/ OpenBLAS
290293
shell: msys2 {0}
291294
run: |
292-
make WHISPER_OPENBLAS=1 -j $(nproc)
295+
make GGML_OPENBLAS=1 -j $(nproc)
293296
294297
- name: Build using CMake
295298
shell: msys2 {0}
@@ -305,7 +308,7 @@ jobs:
305308
- name: Build using CMake w/ OpenBLAS
306309
shell: msys2 {0}
307310
run: |
308-
cmake -B build -DWHISPER_OPENBLAS=ON
311+
cmake -B build -DGGML_OPENBLAS=ON
309312
cmake --build build --config ${{ matrix.build }} -j $(nproc)
310313
311314
windows:
@@ -381,12 +384,9 @@ jobs:
381384
- arch: Win32
382385
obzip: https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.25/OpenBLAS-0.3.25-x86.zip
383386
s2arc: x86
384-
clblast: OFF
385387
- arch: x64
386388
obzip: https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.25/OpenBLAS-0.3.25-x64.zip
387389
s2arc: x64
388-
clblast: ON
389-
clver: 1.6.1
390390
- sdl2: ON
391391
s2ver: 2.28.5
392392

@@ -413,26 +413,13 @@ jobs:
413413
7z x sdl2.zip
414414
echo "SDL2_DIR=$env:GITHUB_WORKSPACE/SDL2-${{ matrix.s2ver }}/cmake" >> $env:GITHUB_ENV
415415
416-
- name: Install OpenCL
417-
if: matrix.clblast == 'ON'
418-
run: vcpkg.exe --triplet=${{ matrix.arch }}-windows install opencl
419-
420-
- name: Fetch CLBlast and set CLBlast_DIR
421-
if: matrix.clblast == 'ON'
422-
run: |
423-
C:/msys64/usr/bin/wget.exe -qO clblast.zip https://github.com/CNugteren/CLBlast/releases/download/${{ matrix.clver }}/CLBlast-${{ matrix.clver }}-windows-x64.zip
424-
7z x clblast.zip
425-
7z x CLBlast-${{ matrix.clver }}-windows-x64.7z
426-
echo "CLBlast_DIR=$env:GITHUB_WORKSPACE/CLBlast-${{ matrix.clver }}-windows-x64/lib/cmake/CLBlast" >> $env:GITHUB_ENV
427-
428416
- name: Configure
429417
run: >
430418
cmake -S . -B ./build -A ${{ matrix.arch }}
431419
-DCMAKE_BUILD_TYPE=${{ matrix.build }}
432-
-DWHISPER_OPENBLAS=${{ matrix.blas }}
420+
-DGGML_OPENBLAS=${{ matrix.blas }}
433421
-DCMAKE_LIBRARY_PATH="$env:OPENBLAS_PATH/lib"
434422
-DWHISPER_SDL2=${{ matrix.sdl2 }}
435-
-DWHISPER_CLBLAST=${{ matrix.clblast }}
436423
437424
- name: Build
438425
run: |
@@ -447,15 +434,11 @@ jobs:
447434
if: matrix.sdl2 == 'ON'
448435
run: copy "$env:SDL2_DIR/../lib/${{ matrix.s2arc }}/SDL2.dll" build/bin/${{ matrix.build }}
449436

450-
- name: Copy clblast.dll
451-
if: matrix.clblast == 'ON'
452-
run: copy "$env:CLBlast_DIR/../../clblast.dll" build/bin/${{ matrix.build }}
453-
454437
- name: Upload binaries
455438
if: matrix.blas == 'ON' && matrix.sdl2 == 'ON'
456439
uses: actions/upload-artifact@v4
457440
with:
458-
name: whisper-blas${{ matrix.clblast == 'ON' && '-clblast' || ''}}-bin-${{ matrix.arch }}
441+
name: whisper-blas-bin-${{ matrix.arch }}
459442
path: build/bin/${{ matrix.build }}
460443

461444
windows-cublas:
@@ -498,7 +481,7 @@ jobs:
498481
run: >
499482
cmake -S . -B ./build -A ${{ matrix.arch }}
500483
-DCMAKE_BUILD_TYPE=${{ matrix.build }}
501-
-DWHISPER_CUDA=${{ matrix.cublas }}
484+
-DGGML_CUDA=${{ matrix.cublas }}
502485
-DWHISPER_SDL2=${{ matrix.sdl2 }}
503486
504487
- name: Build ${{ matrix.cuda-toolkit }}
@@ -628,48 +611,49 @@ jobs:
628611
chmod +x ./gradlew
629612
./gradlew assembleRelease
630613
631-
java:
632-
needs: [ 'windows' ]
633-
runs-on: windows-latest
634-
steps:
635-
- uses: actions/checkout@v4
636-
637-
- name: Install Java
638-
uses: actions/setup-java@v4
639-
with:
640-
distribution: zulu
641-
java-version: 20
642-
643-
- name: Download Windows lib
644-
uses: actions/download-artifact@v4
645-
with:
646-
name: win32-x86-64_whisper.dll
647-
path: bindings/java/build/generated/resources/main/win32-x86-64
648-
649-
- name: Build
650-
run: |
651-
models\download-ggml-model.cmd tiny.en
652-
cd bindings/java
653-
chmod +x ./gradlew
654-
./gradlew build
655-
656-
- name: Upload jar
657-
uses: actions/upload-artifact@v4
658-
with:
659-
name: whispercpp.jar
660-
path: bindings/java/build/libs/whispercpp-*.jar
661-
662-
- name: Publish package
663-
if: ${{ github.ref == 'refs/heads/master' }}
664-
uses: gradle/gradle-build-action@v2.4.2
665-
with:
666-
arguments: publish
667-
build-root-directory: bindings/java
668-
env:
669-
MAVEN_USERNAME: ${{ secrets.JIRA_USER }}
670-
MAVEN_PASSWORD: ${{ secrets.JIRA_PASS }}
671-
PGP_SECRET: ${{ secrets.GPG_PRIVATE_KEY }}
672-
PGP_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
614+
# TODO: disabled because of following fail: https://github.com/ggerganov/whisper.cpp/actions/runs/9686220096/job/26735899598
615+
# java:
616+
# needs: [ 'windows' ]
617+
# runs-on: windows-latest
618+
# steps:
619+
# - uses: actions/checkout@v4
620+
#
621+
# - name: Install Java
622+
# uses: actions/setup-java@v4
623+
# with:
624+
# distribution: zulu
625+
# java-version: 20
626+
#
627+
# - name: Download Windows lib
628+
# uses: actions/download-artifact@v4
629+
# with:
630+
# name: win32-x86-64_whisper.dll
631+
# path: bindings/java/build/generated/resources/main/win32-x86-64
632+
#
633+
# - name: Build
634+
# run: |
635+
# models\download-ggml-model.cmd tiny.en
636+
# cd bindings/java
637+
# chmod +x ./gradlew
638+
# ./gradlew build
639+
#
640+
# - name: Upload jar
641+
# uses: actions/upload-artifact@v4
642+
# with:
643+
# name: whispercpp.jar
644+
# path: bindings/java/build/libs/whispercpp-*.jar
645+
#
646+
# - name: Publish package
647+
# if: ${{ github.ref == 'refs/heads/master' }}
648+
# uses: gradle/gradle-build-action@v2.4.2
649+
# with:
650+
# arguments: publish
651+
# build-root-directory: bindings/java
652+
# env:
653+
# MAVEN_USERNAME: ${{ secrets.JIRA_USER }}
654+
# MAVEN_PASSWORD: ${{ secrets.JIRA_PASS }}
655+
# PGP_SECRET: ${{ secrets.GPG_PRIVATE_KEY }}
656+
# PGP_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
673657

674658
quantize:
675659
runs-on: ubuntu-latest

.gitignore

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,7 @@
1010
/CMakeSettings.json
1111

1212
build/
13-
build-blas/
14-
build-coreml/
15-
build-em/
16-
build-debug/
17-
build-release/
18-
build-rwdi/
19-
build-static/
20-
build-cublas/
21-
build-no-accel/
22-
build-sanitize-addr/
23-
build-sanitize-thread/
13+
build-*/
2414

2515
# SPM
2616
.build/

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "bindings/ios"]
2-
path = bindings/ios
3-
url = https://github.com/ggerganov/whisper.spm

0 commit comments

Comments
 (0)