[whisper_cpp] Update to v1.9.3; add CUDA (x86_64, aarch64/Jetson) and Metal builds - #14509
[whisper_cpp] Update to v1.9.3; add CUDA (x86_64, aarch64/Jetson) and Metal builds#14509ChrisRackauckas wants to merge 1 commit into
Conversation
|
Local BinaryBuilder result for i.e. |
87edf17 to
9da300e
Compare
- whisper.cpp v1.9.3 (was v1.2.0 from 2023). Ships the split ggml libraries (libggml, libggml-base, libggml-cpu) alongside libwhisper, plus libparakeet and the whisper-cli / whisper-bench / whisper-quantize executables. - Drops the bundled install_includes.patch: headers are installed upstream now. - Metal on aarch64-apple-darwin (embedded shader library). - CUDA artifacts for x86_64-linux-gnu and aarch64-linux-gnu (jetson, sbsa, and 13.x), selected through the cuda platform tag; built at feature boundaries (12.2, 12.6, 12.8, 13.0) since the newest compatible artifact is selected. - Mirrors L/llama_cpp for the CPU build flags and platform exclusions, and N/NCCL / M/MAGMA for the aarch64 CUDA cross-compile. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014mQ1kBsPfYwGCQcG8wpVbr
9da300e to
084e768
Compare
|
Second local run: cudart/cublas now resolve; the executables' link still failed on the driver API — |
|
Local BinaryBuilder build of Audit notes:
(Posted automatically when the local build finished.) |
Updates
whisper_cppfrom v1.2.0 (February 2023) to v1.9.3, and adds CUDA (x86_64 and aarch64 Linux) and Metal (Apple Silicon) builds.Motivation: Whisper.jl is being brought up to date (aviks/Whisper.jl#13) and needs a current library; the 1.2 JLL is three years and ~7 minor releases behind whisper.cpp, and has no GPU backend at all.
What the recipe does
Layout follows
L/llama_cpp(same ggml core, maintained here): libwhisper now links the split ggml libraries, all shipped as products —libwhisper,libggml,libggml-base,libggml-cpu, pluslibparakeet(new in 1.9) and thewhisper-cli/whisper-bench/whisper-quantizeexecutables. The oldinstall_includes.patchis dropped; headers are installed upstream now.CPU builds (12):
supported_platforms()minus armv6l/armv7l/powerpc64le/aarch64-musl (same exclusions as the old recipe and as llama_cpp),expand_cxxstring_abis.-DGGML_NATIVE=OFF; AVX/AVX2/FMA/F16C on x86_64 and i686, as llama_cpp does. Metal onaarch64-apple-darwinwith the embedded shader library (compiled at run time, so no Metal toolchain is needed at build time).CUDA builds (11): through
platforms/cuda.jl, onebuild_tarballscall per platform withCUDA.required_dependenciesandaugment_platform_block = CUDA.augment, modelled onN/NCCLandM/MAGMA(including the host-nvcc copy for the aarch64 cross-compile, and libnvvm as a separate redist from CUDA 13). CPU artifacts carry nocudatag, so they remain the fallback on hosts withoutCUDA_Runtime_jll.CUDA versions are built at feature boundaries rather than for every minor, since an artifact built against X.Y is selected for any host X.Z ≥ Y and the newest compatible one wins:
sm_120) support in ggmlCMAKE_CUDA_ARCHITECTURESis left to ggml, which picks a portable list per toolkit version (PTX for older archs, SASS for common ones). Happy to trim the version list if 11 CUDA builds is too much CI.Two things specific to building ggml-cuda against
CUDA_SDK_jll: the SDK keeps libraries incuda/libwhile nvcc'snvcc.profileandFindCUDAToolkitlook inlib64first, and it ships only the shared cudart (libcudart.so,libcudadevrt.a, nolibcudart_static.a, which nvcc links by default). The recipe symlinkslib64 -> liband passes-cudart=shared/CMAKE_CUDA_RUNTIME_LIBRARY=Shared. The shared runtime is what we want anyway —CUDA_Runtime_jllprovideslibcudart/libcublasat run time.GGML_CUDA_NCCL=OFF(optional, not available here).Verified locally (BinaryBuilder on macOS via Docker/Rosetta)
x86_64-linux-gnu-cxx11CPU: builds and passes the audit. The only note is the expected "Minimum instruction set detected for libggml-cpu.so is avx2", same as llama_cpp. The resulting tarball was installed on an x86_64 Linux host throughOverrides.tomland drives Whisper.jl correctly (transcription and timestamps right; BB's$ORIGINrpaths resolve the ggml libraries).x86_64-linux-gnu-cxx11-cuda+12.2: cmake configure and CUDA compiler detection pass with the fixes above and the nvcc build is running (203 steps, slow under Rosetta); I will report the outcome here. CI is the real check.The matching whisper.cpp 1.9.3 binaries built outside BinaryBuilder were exercised on aarch64-linux (Jetson AGX Orin, CPU and CUDA), aarch64-apple-darwin (Metal) and x86_64-linux through Whisper.jl's test suite, so the library itself and its layout are known good on those platforms; what CI validates is the BinaryBuilder cross-compilation of them.
Notes
julia_compat = "1.10"(augmented platforms),preferred_gcc_version = v"10"(C++17; CUDA 12/13 host-compiler compatible).WHISPER_BUILD_SERVER=OFF,WHISPER_SDL2=OFF,WHISPER_CURL=OFF: the server and the SDL2 examples pull in extra dependencies and are not needed for the JLL.-DWHISPER_BUILD_IS_DEV=OFFsowhisper_version()reports1.9.3rather than1.9.3-dev.