From: bobqianic Date: Fri, 29 Dec 2023 09:38:35 +0000 (+0000) Subject: whisper : replace `tensor->n_dims` with `ggml_n_dims(tensor)` (#1694) X-Git-Tag: upstream/1.7.4~1191 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=f5f485f8990f903fcffac7d39787dc5742034d9f;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp whisper : replace `tensor->n_dims` with `ggml_n_dims(tensor)` (#1694) --- diff --git a/openvino/whisper-openvino-encoder.cpp b/openvino/whisper-openvino-encoder.cpp index 11aef39d..4d9ce122 100644 --- a/openvino/whisper-openvino-encoder.cpp +++ b/openvino/whisper-openvino-encoder.cpp @@ -64,15 +64,15 @@ int whisper_openvino_encode( return 0; } - if (mel->n_dims != 2) { + if (ggml_n_dims(mel) != 2) { fprintf(stderr, "%s: Error! mel ggml_tensor expected to have n_dims=2, but it has n_dims=%d\n", - __func__, mel->n_dims); + __func__, ggml_n_dims(mel)); return 0; } - if (out->n_dims != 2) { + if (ggml_n_dims(out) != 2) { fprintf(stderr, "%s: Error! out ggml_tensor expected to have n_dims=2, but it has n_dims=%d\n", - __func__, out->n_dims); + __func__, ggml_n_dims(out)); return 0; } @@ -105,4 +105,4 @@ int whisper_openvino_encode( } return 1; -} \ No newline at end of file +}