Skip to content

whisper_backend_init_gpu: failed to initialize Metal backend #3009

Open
@7k50

Description

@7k50

On MacOS, I'm suddenly having pecuilar issues when running, e.g.:

./build/bin/whisper-cli -f samples/jfk.wav

or

./build/bin/whisper-cli -m models/ggml-base.en.bin -f samples/jfk.wav

The main issue seems to be:

ggml_backend_metal_device_init: error: failed to allocate context
whisper_backend_init_gpu: failed to initialize Metal backend
whisper_backend_init: using BLAS backend

Giving lots of errors like:

program_source:396:38: error: unknown type name 'block_iq2_xxs'
void dequantize_iq2_xxs(device const block_iq2_xxs * xb, short il, thread type4x4 & reg) {
                                     ^
program_source:408:52: error: use of undeclared identifier 'iq2xxs_grid'
    constant uint8_t * grid = (constant uint8_t *)(iq2xxs_grid + aux8[2*il+0]);

I'm having this problem both in whisper.cpp v.1.7.4 & v.1.7.5.
I've tried reinstalling both from scratch (using Python 3.10 & 3.11 respectively).
I've also tried on different Macs, running MacOS 15.4 & 15.3.2.
Xcode version is however the same regardless of MacOS version (Xcode 16.3 released a few days ago), since it's updated via App Store.

xcrun --sdk macosx --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk

I don't have an idea about what the problem is, or how to resolve.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions