metal : relax conditions on fast matrix multiplication kernel

This commit is contained in:
Georgi Gerganov 2023-09-14 16:14:29 +03:00
parent 71ca2fad7d
commit 336afbcb76
No known key found for this signature in database
GPG key ID: 449E073F9DC10735
6 changed files with 154 additions and 58 deletions

View file

@ -52,7 +52,7 @@ int main(int argc, char ** argv) {
ggml_metal_set_tensor(ctx_metal, input);
// warmup
ggml_metal_graph_compute(ctx_metal, &gf);
ggml_metal_graph_compute(ctx_metal, &gf, false);
const int n_iter = 16;
@ -60,7 +60,7 @@ int main(int argc, char ** argv) {
// the actual inference happens here
for (int i = 0; i < n_iter; ++i) {
ggml_metal_graph_compute(ctx_metal, &gf);
ggml_metal_graph_compute(ctx_metal, &gf, false);
}
const int64_t t1 = ggml_time_us();