]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
bindings/go : add linker flags to make metal work (#1944)
authorJosh Bleecher Snyder <redacted>
Sat, 9 Mar 2024 16:50:44 +0000 (08:50 -0800)
committerGitHub <redacted>
Sat, 9 Mar 2024 16:50:44 +0000 (18:50 +0200)
The first two are required to build.
The last one is to make it actually detect the GPU.

Fixes #1899, at least for me

bindings/go/whisper.go

index 9660662084f53d99aa1cfd515ca5cc21da65f61e..87da83f0f108aa9810d450981d12aeb96a3adeda 100644 (file)
@@ -10,7 +10,7 @@ import (
 
 /*
 #cgo LDFLAGS: -lwhisper -lm -lstdc++
-#cgo darwin LDFLAGS: -framework Accelerate
+#cgo darwin LDFLAGS: -framework Accelerate -framework Metal -framework Foundation -framework CoreGraphics
 #include <whisper.h>
 #include <stdlib.h>