Skip to content

Error: Failed to initialize whisper context (whisper.cpp w.r.t. metal) #1297

@shyamalschandra

Description

@shyamalschandra

I just did a make on the folder after running the bash script and I get the following output:

whisper_init_from_file_no_state: loading model from 'models/ggml-base.en.bin'
whisper_model_load: loading model
whisper_model_load: n_vocab       = 51864
whisper_model_load: n_audio_ctx   = 1500
whisper_model_load: n_audio_state = 512
whisper_model_load: n_audio_head  = 8
whisper_model_load: n_audio_layer = 6
whisper_model_load: n_text_ctx    = 448
whisper_model_load: n_text_state  = 512
whisper_model_load: n_text_head   = 8
whisper_model_load: n_text_layer  = 6
whisper_model_load: n_mels        = 80
whisper_model_load: ftype         = 1
whisper_model_load: qntvr         = 0
whisper_model_load: type          = 2
whisper_model_load: adding 1607 extra tokens
whisper_model_load: model ctx     =  140.66 MB
whisper_model_load: model size    =  140.54 MB
whisper_init_state: kv self size  =    5.25 MB
whisper_init_state: kv cross size =   17.58 MB
whisper_init_state: compute buffer (conv)   =   14.10 MB
whisper_init_state: compute buffer (encode) =   81.85 MB
whisper_init_state: compute buffer (cross)  =    4.40 MB
whisper_init_state: compute buffer (decode) =   24.61 MB
ggml_metal_init: allocating
ggml_metal_init: found device: AMD Radeon Pro 575X
ggml_metal_init: picking default device: AMD Radeon Pro 575X
ggml_metal_init: loading '/Users/dominodatasystems/whisper.cpp/ggml-metal.metal'
ggml_metal_init: loaded kernel_add                         0x7fcfffc06570 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_add_row                     0x7fcfffc06d70 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_mul                         0x7fcfffc07570 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_mul_row                     0x7fd018f04e30 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_scale                       0x7fd018f059a0 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_silu                        0x7fd019807650 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_relu                        0x7fd018f061a0 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_gelu                        0x7fd019807fb0 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_soft_max                    0x7fd0198087b0 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_soft_max_4                  0x7fd018f069a0 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_diag_mask_inf               0x7fd019808fb0 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_diag_mask_inf_8             0x7fcfffc07d70 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_get_rows_f32                0x7fd019809920 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_get_rows_f16                0x7fd018f071a0 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_get_rows_q4_0               0x7fd01980a120 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_get_rows_q4_1               0x7fd018f079a0 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_get_rows_q8_0               0x7fd01980a920 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_get_rows_q2_K               0x7fd01980b120 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_get_rows_q3_K               0x7fd01980b920 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_get_rows_q4_K               0x7fd018f081a0 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_get_rows_q5_K               0x7fd01980c3b0 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_get_rows_q6_K               0x7fd01980cd30 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_rms_norm                    0x7fd01980d530 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_norm                        0x7fd01980deb0 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_mul_mat_f32_f32             0x7fd018f089a0 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_mul_mat_f16_f32             0x7fd018f091a0 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_mul_mat_f16_f32_1row        0x7fd018f099a0 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_mul_mat_f16_f32_l4          0x7fd01980e6b0 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_mul_mat_q4_0_f32            0x7fd018f0a1a0 | th_max =  768 | th_width =   64
ggml_metal_init: loaded kernel_mul_mat_q4_1_f32            0x7fd018f0ab20 | th_max =  768 | th_width =   64
ggml_metal_init: loaded kernel_mul_mat_q8_0_f32            0x7fcfffc08570 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_mul_mat_q2_K_f32            0x7fd018f0b320 | th_max =  768 | th_width =   64
ggml_metal_init: loaded kernel_mul_mat_q3_K_f32            0x7fd018f0bb20 | th_max =  512 | th_width =   64
ggml_metal_init: loaded kernel_mul_mat_q4_K_f32            0x7fcfe8f04340 | th_max =  768 | th_width =   64
ggml_metal_init: loaded kernel_mul_mat_q5_K_f32            0x7fcfe8f04c60 | th_max =  768 | th_width =   64
ggml_metal_init: loaded kernel_mul_mat_q6_K_f32            0x7fcfe8f05460 | th_max = 1024 | th_width =   64
ggml_metal_init: loaded kernel_mul_mm_f32_f32                         0x0 | th_max =    0 | th_width =    0
ggml_metal_init: load pipeline error: Error Domain=CompilerError Code=2 "SC compilation failure
There is a call to an undefined label" UserInfo={NSLocalizedDescription=SC compilation failure
There is a call to an undefined label}
whisper_init_state: ggml_metal_init() failed
error: failed to initialize whisper context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions