whisper.rn 0.5.1 → 0.5.3
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/jni.cpp +12 -3
- package/cpp/ggml-alloc.c +49 -18
- package/cpp/ggml-backend-impl.h +0 -3
- package/cpp/ggml-backend-reg.cpp +8 -0
- package/cpp/ggml-backend.cpp +0 -2
- package/cpp/ggml-backend.h +2 -0
- package/cpp/ggml-cpu/amx/amx.cpp +1 -0
- package/cpp/ggml-cpu/arch/arm/quants.c +428 -26
- package/cpp/ggml-cpu/ggml-cpu-impl.h +4 -2
- package/cpp/ggml-cpu/ggml-cpu.c +67 -24
- package/cpp/ggml-cpu/ops.cpp +489 -364
- package/cpp/ggml-cpu/ops.h +4 -4
- package/cpp/ggml-cpu/repack.cpp +143 -29
- package/cpp/ggml-cpu/simd-mappings.h +25 -25
- package/cpp/ggml-cpu/unary-ops.cpp +151 -0
- package/cpp/ggml-cpu/unary-ops.h +7 -0
- package/cpp/ggml-cpu/vec.cpp +83 -0
- package/cpp/ggml-cpu/vec.h +20 -8
- package/cpp/ggml-impl.h +67 -2
- package/cpp/ggml-metal/ggml-metal-common.cpp +2 -2
- package/cpp/ggml-metal/ggml-metal-context.m +5 -6
- package/cpp/ggml-metal/ggml-metal-device.cpp +300 -14
- package/cpp/ggml-metal/ggml-metal-device.h +26 -1
- package/cpp/ggml-metal/ggml-metal-device.m +243 -28
- package/cpp/ggml-metal/ggml-metal-impl.h +177 -9
- package/cpp/ggml-metal/ggml-metal-ops.cpp +843 -157
- package/cpp/ggml-metal/ggml-metal-ops.h +8 -0
- package/cpp/ggml-metal/ggml-metal.cpp +8 -3
- package/cpp/ggml-metal/ggml-metal.metal +12436 -0
- package/cpp/ggml.c +317 -4
- package/cpp/ggml.h +139 -0
- package/cpp/jsi/RNWhisperJSI.cpp +7 -2
- package/cpp/rn-whisper.h +1 -0
- package/cpp/whisper.cpp +8 -2
- package/ios/RNWhisperContext.mm +3 -1
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/ggml-backend-impl.h +0 -3
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/ggml-backend.h +2 -0
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/ggml-impl.h +67 -2
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/ggml.h +139 -0
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Headers/rn-whisper.h +1 -0
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/Info.plist +0 -0
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/ggml-metal.metal +12436 -0
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/rnwhisper +0 -0
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-backend-impl.h +0 -3
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-backend.h +2 -0
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-impl.h +67 -2
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml.h +139 -0
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/Headers/rn-whisper.h +1 -0
- 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 +12436 -0
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/rnwhisper +0 -0
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/ggml-backend-impl.h +0 -3
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/ggml-backend.h +2 -0
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/ggml-impl.h +67 -2
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/ggml.h +139 -0
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Headers/rn-whisper.h +1 -0
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/Info.plist +0 -0
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/ggml-metal.metal +12436 -0
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/rnwhisper +0 -0
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-backend-impl.h +0 -3
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-backend.h +2 -0
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml-impl.h +67 -2
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/ggml.h +139 -0
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/Headers/rn-whisper.h +1 -0
- 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 +12436 -0
- 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/version.json +1 -1
- package/lib/module/NativeRNWhisper.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/NativeRNWhisper.d.ts +2 -0
- package/lib/typescript/NativeRNWhisper.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/NativeRNWhisper.ts +2 -0
- package/src/version.json +1 -1
- package/whisper-rn.podspec +1 -1
- package/cpp/ggml-metal/ggml-whisper-sim.metallib +0 -0
- package/cpp/ggml-metal/ggml-whisper.metallib +0 -0
- package/ios/rnwhisper.xcframework/ios-arm64/rnwhisper.framework/ggml-whisper.metallib +0 -0
- package/ios/rnwhisper.xcframework/ios-arm64_x86_64-simulator/rnwhisper.framework/ggml-whisper-sim.metallib +0 -0
- package/ios/rnwhisper.xcframework/tvos-arm64/rnwhisper.framework/ggml-whisper.metallib +0 -0
- package/ios/rnwhisper.xcframework/tvos-arm64_x86_64-simulator/rnwhisper.framework/ggml-whisper-sim.metallib +0 -0
|
@@ -39,6 +39,8 @@ size_t wsp_ggml_metal_op_mul_mat_id_extra_ids(const struct wsp_ggml_tensor * op)
|
|
|
39
39
|
// return true if we should use the FA vector kernel for this op
|
|
40
40
|
bool wsp_ggml_metal_op_flash_attn_ext_use_vec(const struct wsp_ggml_tensor * op);
|
|
41
41
|
|
|
42
|
+
size_t wsp_ggml_metal_op_flash_attn_ext_extra_pad(const struct wsp_ggml_tensor * op);
|
|
43
|
+
size_t wsp_ggml_metal_op_flash_attn_ext_extra_blk(const struct wsp_ggml_tensor * op);
|
|
42
44
|
size_t wsp_ggml_metal_op_flash_attn_ext_extra_tmp(const struct wsp_ggml_tensor * op);
|
|
43
45
|
|
|
44
46
|
int wsp_ggml_metal_op_concat (wsp_ggml_metal_op_t ctx, int idx);
|
|
@@ -48,7 +50,9 @@ int wsp_ggml_metal_op_scale (wsp_ggml_metal_op_t ctx, int idx);
|
|
|
48
50
|
int wsp_ggml_metal_op_clamp (wsp_ggml_metal_op_t ctx, int idx);
|
|
49
51
|
int wsp_ggml_metal_op_unary (wsp_ggml_metal_op_t ctx, int idx);
|
|
50
52
|
int wsp_ggml_metal_op_glu (wsp_ggml_metal_op_t ctx, int idx);
|
|
53
|
+
int wsp_ggml_metal_op_sum (wsp_ggml_metal_op_t ctx, int idx);
|
|
51
54
|
int wsp_ggml_metal_op_sum_rows (wsp_ggml_metal_op_t ctx, int idx);
|
|
55
|
+
int wsp_ggml_metal_op_cumsum (wsp_ggml_metal_op_t ctx, int idx);
|
|
52
56
|
int wsp_ggml_metal_op_get_rows (wsp_ggml_metal_op_t ctx, int idx);
|
|
53
57
|
int wsp_ggml_metal_op_set_rows (wsp_ggml_metal_op_t ctx, int idx);
|
|
54
58
|
int wsp_ggml_metal_op_soft_max (wsp_ggml_metal_op_t ctx, int idx);
|
|
@@ -67,7 +71,9 @@ int wsp_ggml_metal_op_group_norm (wsp_ggml_metal_op_t ctx, int idx);
|
|
|
67
71
|
int wsp_ggml_metal_op_norm (wsp_ggml_metal_op_t ctx, int idx);
|
|
68
72
|
int wsp_ggml_metal_op_rope (wsp_ggml_metal_op_t ctx, int idx);
|
|
69
73
|
int wsp_ggml_metal_op_im2col (wsp_ggml_metal_op_t ctx, int idx);
|
|
74
|
+
int wsp_ggml_metal_op_conv_2d (wsp_ggml_metal_op_t ctx, int idx);
|
|
70
75
|
int wsp_ggml_metal_op_conv_transpose_1d (wsp_ggml_metal_op_t ctx, int idx);
|
|
76
|
+
int wsp_ggml_metal_op_conv_transpose_2d (wsp_ggml_metal_op_t ctx, int idx);
|
|
71
77
|
int wsp_ggml_metal_op_upscale (wsp_ggml_metal_op_t ctx, int idx);
|
|
72
78
|
int wsp_ggml_metal_op_pad (wsp_ggml_metal_op_t ctx, int idx);
|
|
73
79
|
int wsp_ggml_metal_op_pad_reflect_1d (wsp_ggml_metal_op_t ctx, int idx);
|
|
@@ -76,6 +82,8 @@ int wsp_ggml_metal_op_timestep_embedding(wsp_ggml_metal_op_t ctx, int idx);
|
|
|
76
82
|
int wsp_ggml_metal_op_argmax (wsp_ggml_metal_op_t ctx, int idx);
|
|
77
83
|
int wsp_ggml_metal_op_argsort (wsp_ggml_metal_op_t ctx, int idx);
|
|
78
84
|
int wsp_ggml_metal_op_leaky_relu (wsp_ggml_metal_op_t ctx, int idx);
|
|
85
|
+
int wsp_ggml_metal_op_opt_step_adamw (wsp_ggml_metal_op_t ctx, int idx);
|
|
86
|
+
int wsp_ggml_metal_op_opt_step_sgd (wsp_ggml_metal_op_t ctx, int idx);
|
|
79
87
|
|
|
80
88
|
#ifdef __cplusplus
|
|
81
89
|
}
|
|
@@ -193,9 +193,14 @@ static size_t wsp_ggml_backend_metal_buffer_type_get_alloc_size(wsp_ggml_backend
|
|
|
193
193
|
} break;
|
|
194
194
|
case WSP_GGML_OP_FLASH_ATTN_EXT:
|
|
195
195
|
{
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
196
|
+
res += wsp_ggml_metal_op_flash_attn_ext_extra_pad(tensor);
|
|
197
|
+
res += wsp_ggml_metal_op_flash_attn_ext_extra_blk(tensor);
|
|
198
|
+
res += wsp_ggml_metal_op_flash_attn_ext_extra_tmp(tensor);
|
|
199
|
+
} break;
|
|
200
|
+
case WSP_GGML_OP_CUMSUM:
|
|
201
|
+
case WSP_GGML_OP_ARGSORT:
|
|
202
|
+
{
|
|
203
|
+
res *= 2;
|
|
199
204
|
} break;
|
|
200
205
|
default:
|
|
201
206
|
break;
|