From 6a31a3bd9806c85ed08266f6ab65181da0f30d03 Mon Sep 17 00:00:00 2001 From: kchro3 <62481661+kchro3@users.noreply.github.com> Date: Sat, 2 Sep 2023 23:21:05 -0700 Subject: [PATCH] swift : add support for k-quants (#2983) --- Package.swift | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index 2c07710cd..96f52c4f0 100644 --- a/Package.swift +++ b/Package.swift @@ -12,9 +12,18 @@ let package = Package( name: "llama", path: ".", exclude: ["ggml-metal.metal"], - sources: ["ggml.c", "llama.cpp", "ggml-alloc.c"], + sources: [ + "ggml.c", + "llama.cpp", + "ggml-alloc.c", + "k_quants.c" + ], publicHeadersPath: "spm-headers", - cSettings: [.unsafeFlags(["-Wno-shorten-64-to-32"]), .define("GGML_USE_ACCELERATE")], + cSettings: [ + .unsafeFlags(["-Wno-shorten-64-to-32"]), + .define("GGML_USE_K_QUANTS"), + .define("GGML_USE_ACCELERATE") + ], linkerSettings: [ .linkedFramework("Accelerate") ]