Skip to content

Commit

Permalink
release : v1.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Nov 7, 2023
1 parent 44b39fd commit 9752de4
Show file tree
Hide file tree
Showing 8 changed files with 399 additions and 146 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ publish: publish-trigger
\n\
cd /path/to/whisper.cpp/bindings/ios\n\
git commit\n\
git tag 1.4.2\n\
git tag 1.4.3\n\
git push origin master --tags\n\
"

Expand Down
4 changes: 3 additions & 1 deletion Sources/test-objc/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

int main(void) {
// load the model (use correct path)
struct whisper_context * ctx = whisper_init_from_file("models/for-tests-ggml-base.en.bin");
struct whisper_context_params cparams = whisper_context_default_params();

struct whisper_context * ctx = whisper_init_from_file_with_params("models/for-tests-ggml-base.en.bin", cparams);
CHECK_T(ctx != NULL);

// run the model
Expand Down
4 changes: 3 additions & 1 deletion Sources/test-swift/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import Foundation
import whisper

let ctx = whisper_init_from_file("models/for-tests-ggml-base.en.bin")
let cparams = whisper_context_default_params()

let ctx = whisper_init_from_file_with_params("models/for-tests-ggml-base.en.bin", cparams)

var params = whisper_full_default_params(WHISPER_SAMPLING_GREEDY)

Expand Down
6 changes: 3 additions & 3 deletions Sources/whisper/ggml-metal.m
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ void ggml_metal_graph_compute(
[encoder setBytes:&ne00 length:sizeof(ne00) atIndex:2];
[encoder setBytes:&ne01 length:sizeof(ne01) atIndex:3];
[encoder setBytes:&ne02 length:sizeof(ne02) atIndex:4];
[encoder setThreadgroupMemoryLength:nth/32*sizeof(float) atIndex:0];
[encoder setThreadgroupMemoryLength:GGML_PAD(nth/32*sizeof(float), 16) atIndex:0];

[encoder dispatchThreadgroups:MTLSizeMake(ne01*ne02*ne03, 1, 1) threadsPerThreadgroup:MTLSizeMake(nth, 1, 1)];
} break;
Expand Down Expand Up @@ -1342,7 +1342,7 @@ void ggml_metal_graph_compute(
[encoder setBytes:&ne00 length:sizeof( int64_t) atIndex:2];
[encoder setBytes:&nb01 length:sizeof(uint64_t) atIndex:3];
[encoder setBytes:&eps length:sizeof( float) atIndex:4];
[encoder setThreadgroupMemoryLength:nth/32*sizeof(float) atIndex:0];
[encoder setThreadgroupMemoryLength:GGML_PAD(nth/32*sizeof(float), 16) atIndex:0];

const int64_t nrows = ggml_nrows(src0);

Expand All @@ -1361,7 +1361,7 @@ void ggml_metal_graph_compute(
[encoder setBytes:&ne00 length:sizeof( int64_t) atIndex:2];
[encoder setBytes:&nb01 length:sizeof(uint64_t) atIndex:3];
[encoder setBytes:&eps length:sizeof( float) atIndex:4];
[encoder setThreadgroupMemoryLength:nth*sizeof(float) atIndex:0];
[encoder setThreadgroupMemoryLength:GGML_PAD(nth*sizeof(float), 16) atIndex:0];

const int64_t nrows = ggml_nrows(src0);

Expand Down
Loading

0 comments on commit 9752de4

Please sign in to comment.