bobqianic commited on
Commit
cee2822
·
unverified ·
1 Parent(s): 919a447

whisper : replace `tensor->n_dims` with `ggml_n_dims(tensor)` (#1694)

Browse files
openvino/whisper-openvino-encoder.cpp CHANGED
@@ -64,15 +64,15 @@ int whisper_openvino_encode(
64
  return 0;
65
  }
66
 
67
- if (mel->n_dims != 2) {
68
  fprintf(stderr, "%s: Error! mel ggml_tensor expected to have n_dims=2, but it has n_dims=%d\n",
69
- __func__, mel->n_dims);
70
  return 0;
71
  }
72
 
73
- if (out->n_dims != 2) {
74
  fprintf(stderr, "%s: Error! out ggml_tensor expected to have n_dims=2, but it has n_dims=%d\n",
75
- __func__, out->n_dims);
76
  return 0;
77
  }
78
 
@@ -105,4 +105,4 @@ int whisper_openvino_encode(
105
  }
106
 
107
  return 1;
108
- }
 
64
  return 0;
65
  }
66
 
67
+ if (ggml_n_dims(mel) != 2) {
68
  fprintf(stderr, "%s: Error! mel ggml_tensor expected to have n_dims=2, but it has n_dims=%d\n",
69
+ __func__, ggml_n_dims(mel));
70
  return 0;
71
  }
72
 
73
+ if (ggml_n_dims(out) != 2) {
74
  fprintf(stderr, "%s: Error! out ggml_tensor expected to have n_dims=2, but it has n_dims=%d\n",
75
+ __func__, ggml_n_dims(out));
76
  return 0;
77
  }
78
 
 
105
  }
106
 
107
  return 1;
108
+ }