diff options
author | Georgi Gerganov <ggerganov@gmail.com> | 2024-02-12 19:54:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-12 19:54:29 +0200 |
commit | df334a11251b81fd0b6a0e51e7146e0ba9e973f2 (patch) | |
tree | b43b8b2cd98ab0f3d0dc466d047868bbb37b7a22 | |
parent | dbd8828eb03b9aa8d0af7e4c533d3c2f5b38aba6 (diff) |
swift : package no longer use ggml dependency (#5465)
* Revert "swift : update Package.swift to use ggml as dependency (#4691)"
This reverts commit ece9a45e8ffb73ad461c792720c2fec28b0137bc.
* spm : add ggml headers
-rw-r--r-- | Package.swift | 24 | ||||
l--------- | spm-headers/ggml-alloc.h | 1 | ||||
l--------- | spm-headers/ggml-backend.h | 1 | ||||
l--------- | spm-headers/ggml.h | 1 |
4 files changed, 22 insertions, 5 deletions
diff --git a/Package.swift b/Package.swift index 37524ede..b24c9204 100644 --- a/Package.swift +++ b/Package.swift @@ -13,17 +13,31 @@ let package = Package( products: [ .library(name: "llama", targets: ["llama"]), ], - dependencies: [ - .package(url: "https://github.com/ggerganov/ggml.git", .branch("release")) - ], targets: [ .target( name: "llama", - dependencies: ["ggml"], path: ".", - exclude: ["ggml-metal.metal"], + exclude: [ + "cmake", + "examples", + "scripts", + "models", + "tests", + "CMakeLists.txt", + "ggml-cuda.cu", + "ggml-cuda.h", + "Makefile" + ], sources: [ + "ggml.c", "llama.cpp", + "ggml-alloc.c", + "ggml-backend.c", + "ggml-quants.c", + "ggml-metal.m", + ], + resources: [ + .process("ggml-metal.metal") ], publicHeadersPath: "spm-headers", cSettings: [ diff --git a/spm-headers/ggml-alloc.h b/spm-headers/ggml-alloc.h new file mode 120000 index 00000000..a49d385a --- /dev/null +++ b/spm-headers/ggml-alloc.h @@ -0,0 +1 @@ +../ggml-alloc.h
\ No newline at end of file diff --git a/spm-headers/ggml-backend.h b/spm-headers/ggml-backend.h new file mode 120000 index 00000000..17c2cf14 --- /dev/null +++ b/spm-headers/ggml-backend.h @@ -0,0 +1 @@ +../ggml-backend.h
\ No newline at end of file diff --git a/spm-headers/ggml.h b/spm-headers/ggml.h new file mode 120000 index 00000000..39215298 --- /dev/null +++ b/spm-headers/ggml.h @@ -0,0 +1 @@ +../ggml.h
\ No newline at end of file |