whisper.rn 0.5.4 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/rnwhisper/WhisperContext.java +5 -0
- package/android/src/main/jni.cpp +13 -0
- package/cpp/ggml-alloc.c +78 -26
- package/cpp/ggml-alloc.h +9 -0
- package/cpp/ggml-backend-impl.h +1 -1
- package/cpp/ggml-backend-reg.cpp +19 -3
- package/cpp/ggml-backend.cpp +72 -20
- package/cpp/ggml-backend.h +2 -1
- package/cpp/ggml-cpu/arch/arm/cpu-feats.cpp +4 -0
- package/cpp/ggml-cpu/arch/arm/repack.cpp +1004 -0
- package/cpp/ggml-cpu/arch/x86/repack.cpp +6 -6
- package/cpp/ggml-cpu/arch-fallback.h +50 -2
- package/cpp/ggml-cpu/ggml-cpu-impl.h +1 -1
- package/cpp/ggml-cpu/ggml-cpu.c +139 -58
- package/cpp/ggml-cpu/ggml-cpu.cpp +4 -0
- package/cpp/ggml-cpu/ops.cpp +170 -18
- package/cpp/ggml-cpu/ops.h +1 -0
- package/cpp/ggml-cpu/repack.cpp +531 -5
- package/cpp/ggml-cpu/repack.h +14 -0
- package/cpp/ggml-cpu/simd-mappings.h +16 -18
- package/cpp/ggml-cpu/vec.cpp +41 -1
- package/cpp/ggml-cpu/vec.h +241 -138
- package/cpp/ggml-cpu.h +1 -0
- package/cpp/ggml-impl.h +0 -4
- package/cpp/ggml-metal/ggml-metal-context.m +26 -16
- package/cpp/ggml-metal/ggml-metal-device.cpp +452 -371
- package/cpp/ggml-metal/ggml-metal-device.h +87 -65
- package/cpp/ggml-metal/ggml-metal-device.m +263 -104
- package/cpp/ggml-metal/ggml-metal-impl.h +58 -4
- package/cpp/ggml-metal/ggml-metal-ops.cpp +415 -98
- package/cpp/ggml-metal/ggml-metal-ops.h +4 -0
- package/cpp/ggml-metal/ggml-metal.cpp +6 -5
- package/cpp/ggml-metal/ggml-metal.metal +404 -34
- package/cpp/ggml.c +110 -31
- package/cpp/ggml.h +51 -12
- package/cpp/jsi/RNWhisperJSI.cpp +1 -0
- package/cpp/whisper.cpp +16 -3
- package/ios/CMakeLists.txt +21 -1
- package/ios/RNWhisperContext.mm +5 -0
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/ggml-alloc.h +9 -0
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/ggml-backend-impl.h +1 -1
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/ggml-backend.h +2 -1
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/ggml-cpu.h +1 -0
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/ggml-impl.h +0 -4
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/ggml.h +51 -12
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Info.plist +0 -0
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/ggml-metal.metal +404 -34
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/rnwhisper +0 -0
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-alloc.h +9 -0
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-backend-impl.h +1 -1
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-backend.h +2 -1
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-cpu.h +1 -0
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-impl.h +0 -4
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml.h +51 -12
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Info.plist +0 -0
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/_CodeSignature/CodeResources +1 -1
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/ggml-metal.metal +404 -34
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/rnwhisper +0 -0
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/ggml-alloc.h +9 -0
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/ggml-backend-impl.h +1 -1
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/ggml-backend.h +2 -1
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/ggml-cpu.h +1 -0
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/ggml-impl.h +0 -4
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/ggml.h +51 -12
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Info.plist +0 -0
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/ggml-metal.metal +404 -34
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/rnwhisper +0 -0
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-alloc.h +9 -0
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-backend-impl.h +1 -1
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-backend.h +2 -1
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-cpu.h +1 -0
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-impl.h +0 -4
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml.h +51 -12
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Info.plist +0 -0
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/_CodeSignature/CodeResources +1 -1
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/ggml-metal.metal +404 -34
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/rnwhisper +0 -0
- package/lib/commonjs/NativeRNWhisper.js.map +1 -1
- package/lib/commonjs/jest-mock.js +2 -0
- package/lib/commonjs/jest-mock.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/NativeRNWhisper.js.map +1 -1
- package/lib/module/jest-mock.js +2 -0
- package/lib/module/jest-mock.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/NativeRNWhisper.d.ts +1 -0
- package/lib/typescript/NativeRNWhisper.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/NativeRNWhisper.ts +1 -0
- package/src/jest-mock.ts +2 -0
- package/src/version.json +1 -1
|
@@ -47,6 +47,7 @@ int wsp_ggml_metal_op_concat (wsp_ggml_metal_op_t ctx, int idx);
|
|
|
47
47
|
int wsp_ggml_metal_op_repeat (wsp_ggml_metal_op_t ctx, int idx);
|
|
48
48
|
int wsp_ggml_metal_op_acc (wsp_ggml_metal_op_t ctx, int idx);
|
|
49
49
|
int wsp_ggml_metal_op_scale (wsp_ggml_metal_op_t ctx, int idx);
|
|
50
|
+
int wsp_ggml_metal_op_fill (wsp_ggml_metal_op_t ctx, int idx);
|
|
50
51
|
int wsp_ggml_metal_op_clamp (wsp_ggml_metal_op_t ctx, int idx);
|
|
51
52
|
int wsp_ggml_metal_op_unary (wsp_ggml_metal_op_t ctx, int idx);
|
|
52
53
|
int wsp_ggml_metal_op_glu (wsp_ggml_metal_op_t ctx, int idx);
|
|
@@ -81,9 +82,12 @@ int wsp_ggml_metal_op_arange (wsp_ggml_metal_op_t ctx, int idx);
|
|
|
81
82
|
int wsp_ggml_metal_op_timestep_embedding(wsp_ggml_metal_op_t ctx, int idx);
|
|
82
83
|
int wsp_ggml_metal_op_argmax (wsp_ggml_metal_op_t ctx, int idx);
|
|
83
84
|
int wsp_ggml_metal_op_argsort (wsp_ggml_metal_op_t ctx, int idx);
|
|
85
|
+
int wsp_ggml_metal_op_top_k (wsp_ggml_metal_op_t ctx, int idx);
|
|
84
86
|
int wsp_ggml_metal_op_leaky_relu (wsp_ggml_metal_op_t ctx, int idx);
|
|
87
|
+
int wsp_ggml_metal_op_tri (wsp_ggml_metal_op_t ctx, int idx);
|
|
85
88
|
int wsp_ggml_metal_op_opt_step_adamw (wsp_ggml_metal_op_t ctx, int idx);
|
|
86
89
|
int wsp_ggml_metal_op_opt_step_sgd (wsp_ggml_metal_op_t ctx, int idx);
|
|
90
|
+
int wsp_ggml_metal_op_count_equal (wsp_ggml_metal_op_t ctx, int idx);
|
|
87
91
|
|
|
88
92
|
#ifdef __cplusplus
|
|
89
93
|
}
|
|
@@ -202,6 +202,10 @@ static size_t wsp_ggml_backend_metal_buffer_type_get_alloc_size(wsp_ggml_backend
|
|
|
202
202
|
{
|
|
203
203
|
res *= 2;
|
|
204
204
|
} break;
|
|
205
|
+
case WSP_GGML_OP_TOP_K:
|
|
206
|
+
{
|
|
207
|
+
res = 2*sizeof(int32_t)*wsp_ggml_nelements(tensor->src[0]);
|
|
208
|
+
} break;
|
|
205
209
|
default:
|
|
206
210
|
break;
|
|
207
211
|
}
|
|
@@ -621,14 +625,11 @@ static int64_t get_op_batch_size(const wsp_ggml_tensor * op) {
|
|
|
621
625
|
}
|
|
622
626
|
|
|
623
627
|
static bool wsp_ggml_backend_metal_device_offload_op(wsp_ggml_backend_dev_t dev, const wsp_ggml_tensor * op) {
|
|
624
|
-
|
|
628
|
+
wsp_ggml_metal_device_t ctx_dev = (wsp_ggml_metal_device_t)dev->context;
|
|
625
629
|
|
|
626
630
|
return (op->op == WSP_GGML_OP_MUL_MAT ||
|
|
627
631
|
op->op == WSP_GGML_OP_MUL_MAT_ID) &&
|
|
628
|
-
get_op_batch_size(op) >=
|
|
629
|
-
|
|
630
|
-
WSP_GGML_UNUSED(dev);
|
|
631
|
-
WSP_GGML_UNUSED(op);
|
|
632
|
+
get_op_batch_size(op) >= wsp_ggml_metal_device_get_props(ctx_dev)->op_offload_min_batch_size;
|
|
632
633
|
}
|
|
633
634
|
|
|
634
635
|
static wsp_ggml_backend_device_i wsp_ggml_backend_metal_device_i = {
|