whisper : adapt to latest ggml (skip) (#0)

This commit is contained in:
Georgi Gerganov
2024-10-05 15:23:51 +03:00
parent 0b1b094a67
commit 941912467d
13 changed files with 368 additions and 2585 deletions
+2 -1
View File
@@ -1239,6 +1239,8 @@ static size_t aheads_masks_nbytes(struct whisper_aheads_masks & aheads_masks) {
static ggml_backend_t whisper_backend_init_gpu(const whisper_context_params & params) {
ggml_backend_t result = NULL;
ggml_log_set(g_state.log_callback, g_state.log_callback_user_data);
#ifdef GGML_USE_CUDA
if (params.use_gpu) {
WHISPER_LOG_INFO("%s: using CUDA backend\n", __func__);
@@ -1252,7 +1254,6 @@ static ggml_backend_t whisper_backend_init_gpu(const whisper_context_params & pa
#ifdef GGML_USE_METAL
if (params.use_gpu) {
WHISPER_LOG_INFO("%s: using Metal backend\n", __func__);
ggml_backend_metal_log_set_callback(g_state.log_callback, g_state.log_callback_user_data);
result = ggml_backend_metal_init();
if (!result) {
WHISPER_LOG_ERROR("%s: ggml_backend_metal_init() failed\n", __func__);