]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
whisper : replace `tensor->n_dims` with `ggml_n_dims(tensor)` (#1694)
authorbobqianic <redacted>
Fri, 29 Dec 2023 09:38:35 +0000 (09:38 +0000)
committerGitHub <redacted>
Fri, 29 Dec 2023 09:38:35 +0000 (11:38 +0200)
openvino/whisper-openvino-encoder.cpp

index 11aef39dd4386ff0cf7002b0ad770bebd0ea8563..4d9ce12285849ff62c76444a53d9602adf34b335 100644 (file)
@@ -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
+}