]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
whisper : add context param to disable gpu (#1293)
authorJhen-Jie Hong <redacted>
Mon, 6 Nov 2023 09:04:24 +0000 (17:04 +0800)
committerGitHub <redacted>
Mon, 6 Nov 2023 09:04:24 +0000 (11:04 +0200)
commit0463028bc2a5774fe7361c8ac37bef440725bcd7
tree1bdf441e0af5bc9104ef67994238d63ecf444d64
parent39cfad0dee803d04756b34850020662f390ca45c
whisper : add context param to disable gpu (#1293)

* whisper : check state->ctx_metal not null

* whisper : add whisper_context_params { use_gpu }

* whisper : new API with params & deprecate old API

* examples : use no-gpu param && whisper_init_from_file_with_params

* whisper.objc : enable metal & disable on simulator

* whisper.swiftui, metal : enable metal & support load default.metallib

* whisper.android : use new API

* bindings : use new API

* addon.node : fix build & test

* bindings : updata java binding

* bindings : add missing whisper_context_default_params_by_ref WHISPER_API for java

* metal : use SWIFTPM_MODULE_BUNDLE for GGML_SWIFT and reuse library load

* metal : move bundle var into block

* metal : use SWIFT_PACKAGE instead of GGML_SWIFT

* style : minor updates

---------

Co-authored-by: Georgi Gerganov <redacted>
29 files changed:
bindings/go/whisper.go
bindings/java/src/main/java/io/github/ggerganov/whispercpp/WhisperContext.java
bindings/java/src/main/java/io/github/ggerganov/whispercpp/WhisperCpp.java
bindings/java/src/main/java/io/github/ggerganov/whispercpp/WhisperCppJnaLibrary.java
bindings/java/src/main/java/io/github/ggerganov/whispercpp/params/WhisperContextParams.java [new file with mode: 0644]
bindings/javascript/emscripten.cpp
bindings/ruby/ext/ruby_whisper.cpp
examples/addon.node/__test__/whisper.spec.js
examples/addon.node/addon.cpp
examples/addon.node/index.js
examples/bench.wasm/emscripten.cpp
examples/bench/bench.cpp
examples/command.wasm/emscripten.cpp
examples/command/command.cpp
examples/lsp/lsp.cpp
examples/main/main.cpp
examples/stream.wasm/emscripten.cpp
examples/stream/stream.cpp
examples/talk-llama/talk-llama.cpp
examples/talk.wasm/emscripten.cpp
examples/talk/talk.cpp
examples/whisper.android/app/src/main/jni/whisper/jni.c
examples/whisper.objc/whisper.objc.xcodeproj/project.pbxproj
examples/whisper.objc/whisper.objc/ViewController.m
examples/whisper.swiftui/whisper.cpp.swift/LibWhisper.swift
examples/whisper.swiftui/whisper.swiftui.xcodeproj/project.pbxproj
examples/whisper.wasm/emscripten.cpp
whisper.cpp
whisper.h