]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
Add Accelerate/BLAS when using Swift (#765)
authorAndrew Duffy <redacted>
Wed, 5 Apr 2023 10:44:24 +0000 (11:44 +0100)
committerGitHub <redacted>
Wed, 5 Apr 2023 10:44:24 +0000 (06:44 -0400)
Package.swift

index 79d13c82d9b87703d6a7776616eae46a9bd8f9ef..2c2c147ba35927387a38a69d0d5eaae0c93174b1 100644 (file)
@@ -13,7 +13,10 @@ let package = Package(
             path: ".",
             sources: ["ggml.c", "llama.cpp"],
             publicHeadersPath: "spm-headers",
-            cSettings: [.unsafeFlags(["-Wno-shorten-64-to-32"])]
+            cSettings: [.unsafeFlags(["-Wno-shorten-64-to-32"]), .define("GGML_USE_ACCELERATE")],
+            linkerSettings: [
+                .linkedFramework("Accelerate")
+            ]
         ),
     ],
     cxxLanguageStandard: .cxx11