Skip to content

Commit

Permalink
swift : package no longer use ggml dependency (ggerganov#5465)
Browse files Browse the repository at this point in the history
* Revert "swift : update Package.swift to use ggml as dependency (ggerganov#4691)"

This reverts commit ece9a45.

* spm : add ggml headers
  • Loading branch information
ggerganov authored and jordankanter committed Mar 13, 2024
1 parent 7c8e55f commit 56360e7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
24 changes: 19 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
1 change: 1 addition & 0 deletions spm-headers/ggml-alloc.h
1 change: 1 addition & 0 deletions spm-headers/ggml-backend.h
1 change: 1 addition & 0 deletions spm-headers/ggml.h

0 comments on commit 56360e7

Please sign in to comment.