]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
whisper : return with error from whisper_encode_internal and whisper_decode_internal...
authorBen Nortier <redacted>
Fri, 10 Nov 2023 11:51:16 +0000 (13:51 +0200)
committerGitHub <redacted>
Fri, 10 Nov 2023 11:51:16 +0000 (13:51 +0200)
Co-authored-by: Ben Nortier <redacted>
whisper.cpp

index d36349b0ce340153540ec6d518debec7dcee9599..681727f5cd16b85f7c3f737cd6c4034052e92967 100644 (file)
@@ -2027,7 +2027,7 @@ static bool whisper_encode_internal(
     wstate.t_encode_us += ggml_time_us() - t_start_us;
     wstate.n_encode++;
 
-    return true;
+    return !(abort_callback && abort_callback(abort_callback_data));
 }
 
 static struct ggml_cgraph * whisper_build_graph_decoder(
@@ -2447,7 +2447,7 @@ static bool whisper_decode_internal(
         wstate.n_prompt++;
     }
 
-    return true;
+    return !(abort_callback && abort_callback(abort_callback_data));
 }