From 3ffc83d90a958e3810f02e49de44abc3a85f9a35 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Mon, 12 Feb 2024 19:54:11 +0200 Subject: [PATCH] swift : package no longer use ggml dependency (#1861) * Revert "swift : update Package.swift to use ggml as package dependency (#1701)" This reverts commit 993acb5d410cd8eaebaa3fc54d4b153e04bbefce. * spm : add ggml.h --- Package.swift | 10 ++++++---- spm-headers/ggml.h | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) create mode 120000 spm-headers/ggml.h diff --git a/Package.swift b/Package.swift index e8b85afce81..bbb7fb03b99 100644 --- a/Package.swift +++ b/Package.swift @@ -13,13 +13,9 @@ let package = Package( products: [ .library(name: "whisper", targets: ["whisper"]), ], - dependencies: [ - .package(url: "https://github.com/ggerganov/ggml.git", .branch("release")) - ], targets: [ .target( name: "whisper", - dependencies: ["ggml"], path: ".", exclude: [ "bindings", @@ -36,8 +32,14 @@ let package = Package( "Makefile" ], sources: [ + "ggml.c", "whisper.cpp", + "ggml-alloc.c", + "ggml-backend.c", + "ggml-quants.c", + "ggml-metal.m" ], + resources: [.process("ggml-metal.metal")], publicHeadersPath: "spm-headers", cSettings: [ .unsafeFlags(["-Wno-shorten-64-to-32", "-O3", "-DNDEBUG"]), diff --git a/spm-headers/ggml.h b/spm-headers/ggml.h new file mode 120000 index 00000000000..39215298f98 --- /dev/null +++ b/spm-headers/ggml.h @@ -0,0 +1 @@ +../ggml.h \ No newline at end of file