arizhih commited on
Commit
1d1d815
·
unverified ·
1 Parent(s): 81fa005

whisper : fix DTW assert (#2299)

Browse files
Files changed (1) hide show
  1. src/whisper.cpp +3 -2
src/whisper.cpp CHANGED
@@ -7220,9 +7220,10 @@ struct median_filter_user_data {
7220
  };
7221
 
7222
  static void median_filter(struct ggml_tensor * dst , const struct ggml_tensor * a, int ith, int nth, void * userdata) {
 
 
 
7223
  int filter_width = ((median_filter_user_data *) userdata)->filter_width;
7224
- WHISPER_ASSERT(nth == 1);
7225
- WHISPER_ASSERT(ith == 0);
7226
  WHISPER_ASSERT(filter_width < a->ne[2]);
7227
  WHISPER_ASSERT(filter_width % 2);
7228
  WHISPER_ASSERT(ggml_n_dims(a) == 3);
 
7220
  };
7221
 
7222
  static void median_filter(struct ggml_tensor * dst , const struct ggml_tensor * a, int ith, int nth, void * userdata) {
7223
+ if (ith != 0) {
7224
+ return;
7225
+ }
7226
  int filter_width = ((median_filter_user_data *) userdata)->filter_width;
 
 
7227
  WHISPER_ASSERT(filter_width < a->ne[2]);
7228
  WHISPER_ASSERT(filter_width % 2);
7229
  WHISPER_ASSERT(ggml_n_dims(a) == 3);