Skip to content

Commit

Permalink
files : move public headers to include
Browse files Browse the repository at this point in the history
ggml-ci
  • Loading branch information
ggerganov committed Jun 26, 2024
1 parent 7e44e1f commit a7b3103
Show file tree
Hide file tree
Showing 19 changed files with 103 additions and 98 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion src/ggml-sycl.h → include/ggml-sycl.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

#include "ggml.h"
#include "ggml-backend.h"
#include "ggml-sycl/presets.hpp"

#define GGML_SYCL_NAME "SYCL"
#define GGML_SYCL_MAX_DEVICES 48

#ifdef __cplusplus
extern "C" {
Expand Down
File renamed without changes.
26 changes: 14 additions & 12 deletions scripts/sync-llama-am.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,25 +110,26 @@ if [ -f $SRC_GGML/llama-src.patch ]; then
# ggml/src/ggml-common.h -> src/ggml-common.h
# ggml/src/ggml-cuda/* -> src/ggml-cuda/*
# ggml/src/ggml-cuda.cu -> src/ggml-cuda.cu
# ggml/src/ggml-cuda.h -> src/ggml-cuda.h
# ggml/src/ggml-impl.h -> src/ggml-impl.h
# ggml/src/ggml-kompute.cpp -> src/ggml-kompute.cpp
# ggml/src/ggml-kompute.h -> src/ggml-kompute.h
# ggml/src/ggml-metal.h -> src/ggml-metal.h
# ggml/src/ggml-metal.m -> src/ggml-metal.m
# ggml/src/ggml-quants.c -> src/ggml-quants.c
# ggml/src/ggml-quants.h -> src/ggml-quants.h
# ggml/src/ggml-rpc.cpp -> src/ggml-rpc.cpp
# ggml/src/ggml-rpc.h -> src/ggml-rpc.h
# ggml/src/ggml-sycl/* -> src/ggml-sycl/*
# ggml/src/ggml-sycl.cpp -> src/ggml-sycl.cpp
# ggml/src/ggml-sycl.h -> src/ggml-sycl.h
# ggml/src/ggml-vulkan.cpp -> src/ggml-vulkan.cpp
# ggml/src/ggml-vulkan.h -> src/ggml-vulkan.h
#
# ggml/include/ggml.h -> include/ggml.h
# ggml/include/ggml-alloc.h -> include/ggml-alloc.h
# ggml/include/ggml-backend.h -> include/ggml-backend.h
# ggml/include/ggml-blas.h -> include/ggml-blas.h
# ggml/include/ggml-cuda.h -> include/ggml-cuda.h
# ggml/include/ggml-kompute.h -> include/ggml-kompute.h
# ggml/include/ggml-metal.h -> include/ggml-metal.h
# ggml/include/ggml-rpc.h -> include/ggml-rpc.h
# ggml/include/ggml-sycl.h -> include/ggml-sycl.h
# ggml/include/ggml-vulkan.h -> include/ggml-vulkan.h
#
# tests/test-opt.cpp -> tests/test-opt.cpp
# tests/test-grad0.cpp -> tests/test-grad0.cpp
Expand All @@ -152,24 +153,25 @@ if [ -f $SRC_GGML/llama-src.patch ]; then
-e 's/\/ggml\/src\/ggml-common\.h/\/src\/ggml-common.h/g' \
-e 's/\/ggml\/src\/ggml-cuda\//\/src\/ggml-cuda\//g' \
-e 's/\/ggml\/src\/ggml-cuda\.cu/\/src\/ggml-cuda.cu/g' \
-e 's/\/ggml\/src\/ggml-cuda\.h/\/src\/ggml-cuda.h/g' \
-e 's/\/ggml\/src\/ggml-impl\.h/\/src\/ggml-impl.h/g' \
-e 's/\/ggml\/src\/ggml-kompute\.cpp/\/src\/ggml-kompute.cpp/g' \
-e 's/\/ggml\/src\/ggml-kompute\.h/\/src\/ggml-kompute.h/g' \
-e 's/\/ggml\/src\/ggml-metal\.h/\/src\/ggml-metal.h/g' \
-e 's/\/ggml\/src\/ggml-metal\.m/\/src\/ggml-metal.m/g' \
-e 's/\/ggml\/src\/ggml-quants\.c/\/src\/ggml-quants.c/g' \
-e 's/\/ggml\/src\/ggml-quants\.h/\/src\/ggml-quants.h/g' \
-e 's/\/ggml\/src\/ggml-rpc\.cpp/\/src\/ggml-rpc.cpp/g' \
-e 's/\/ggml\/src\/ggml-rpc\.h/\/src\/ggml-rpc.h/g' \
-e 's/\/ggml\/src\/ggml-sycl\//\/src\/ggml-sycl\//g' \
-e 's/\/ggml\/src\/ggml-sycl\.cpp/\/src\/ggml-sycl.cpp/g' \
-e 's/\/ggml\/src\/ggml-sycl\.h/\/src\/ggml-sycl.h/g' \
-e 's/\/ggml\/src\/ggml-vulkan\.cpp/\/src\/ggml-vulkan.cpp/g' \
-e 's/\/ggml\/src\/ggml-vulkan\.h/\/src\/ggml-vulkan.h/g' \
-e 's/\/ggml\/include\/ggml\.h/\/include\/ggml.h/g' \
-e 's/\/ggml\/include\/ggml-alloc\.h/\/include\/ggml-alloc.h/g' \
-e 's/\/ggml\/include\/ggml-backend\.h/\/include\/ggml-backend.h/g' \
-e 's/\/ggml\/include\/ggml-blas\.h/\/include\/ggml-blas.h/g' \
-e 's/\/ggml\/include\/ggml-cuda\.h/\/include\/ggml-cuda.h/g' \
-e 's/\/ggml\/include\/ggml-kompute\.h/\/include\/ggml-kompute.h/g' \
-e 's/\/ggml\/include\/ggml-metal\.h/\/include\/ggml-metal.h/g' \
-e 's/\/ggml\/include\/ggml-rpc\.h/\/include\/ggml-rpc.h/g' \
-e 's/\/ggml\/include\/ggml-sycl\.h/\/include\/ggml-sycl.h/g' \
-e 's/\/ggml\/include\/ggml-vulkan\.h/\/include\/ggml-vulkan.h/g' \
-e 's/\/tests\/test-opt\.cpp/\/tests\/test-opt.cpp/g' \
-e 's/\/tests\/test-grad0\.cpp/\/tests\/test-grad0.cpp/g' \
-e 's/\/tests\/test-quantize-fns\.cpp/\/tests\/test-quantize-fns.cpp/g' \
Expand Down
13 changes: 7 additions & 6 deletions scripts/sync-llama.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,27 @@ cp -rpv ../llama.cpp/ggml/src/ggml-blas.h src/ggml-blas.h
cp -rpv ../llama.cpp/ggml/src/ggml-common.h src/ggml-common.h
cp -rpv ../llama.cpp/ggml/src/ggml-cuda/* src/ggml-cuda/
cp -rpv ../llama.cpp/ggml/src/ggml-cuda.cu src/ggml-cuda.cu
cp -rpv ../llama.cpp/ggml/src/ggml-cuda.h src/ggml-cuda.h
cp -rpv ../llama.cpp/ggml/src/ggml-impl.h src/ggml-impl.h
cp -rpv ../llama.cpp/ggml/src/ggml-kompute.cpp src/ggml-kompute.cpp
cp -rpv ../llama.cpp/ggml/src/ggml-kompute.h src/ggml-kompute.h
cp -rpv ../llama.cpp/ggml/src/ggml-metal.h src/ggml-metal.h
cp -rpv ../llama.cpp/ggml/src/ggml-metal.m src/ggml-metal.m
cp -rpv ../llama.cpp/ggml/src/ggml-metal.metal src/ggml-metal.metal
cp -rpv ../llama.cpp/ggml/src/ggml-quants.c src/ggml-quants.c
cp -rpv ../llama.cpp/ggml/src/ggml-quants.h src/ggml-quants.h
cp -rpv ../llama.cpp/ggml/src/ggml-rpc.cpp src/ggml-rpc.cpp
cp -rpv ../llama.cpp/ggml/src/ggml-rpc.h src/ggml-rpc.h
cp -rpv ../llama.cpp/ggml/src/ggml-sycl/* src/ggml-sycl/
cp -rpv ../llama.cpp/ggml/src/ggml-sycl.cpp src/ggml-sycl.cpp
cp -rpv ../llama.cpp/ggml/src/ggml-sycl.h src/ggml-sycl.h
cp -rpv ../llama.cpp/ggml/src/ggml-vulkan.cpp src/ggml-vulkan.cpp
cp -rpv ../llama.cpp/ggml/src/ggml-vulkan.h src/ggml-vulkan.h

cp -rpv ../llama.cpp/ggml/include/ggml.h include/ggml.h
cp -rpv ../llama.cpp/ggml/include/ggml-alloc.h include/ggml-alloc.h
cp -rpv ../llama.cpp/ggml/include/ggml-backend.h include/ggml-backend.h
cp -rpv ../llama.cpp/ggml/include/ggml-blas.h include/ggml-blas.h
cp -rpv ../llama.cpp/ggml/include/ggml-cuda.h include/ggml-cuda.h
cp -rpv ../llama.cpp/ggml/include/ggml-kompute.h include/ggml-kompute.h
cp -rpv ../llama.cpp/ggml/include/ggml-metal.h include/ggml-metal.h
cp -rpv ../llama.cpp/ggml/include/ggml-rpc.h include/ggml-rpc.h
cp -rpv ../llama.cpp/ggml/include/ggml-sycl.h include/ggml-sycl.h
cp -rpv ../llama.cpp/ggml/include/ggml-vulkan.h include/ggml-vulkan.h

cp -rpv ../llama.cpp/tests/test-opt.cpp tests/test-opt.cpp
cp -rpv ../llama.cpp/tests/test-grad0.cpp tests/test-grad0.cpp
Expand Down
26 changes: 14 additions & 12 deletions scripts/sync-whisper-am.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,25 +108,26 @@ if [ -f $SRC_GGML/whisper-src.patch ]; then
# ggml/src/ggml-common.h -> src/ggml-common.h
# ggml/src/ggml-cuda/* -> src/ggml-cuda/*
# ggml/src/ggml-cuda.cu -> src/ggml-cuda.cu
# ggml/src/ggml-cuda.h -> src/ggml-cuda.h
# ggml/src/ggml-impl.h -> src/ggml-impl.h
# ggml/src/ggml-kompute.cpp -> src/ggml-kompute.cpp
# ggml/src/ggml-kompute.h -> src/ggml-kompute.h
# ggml/src/ggml-metal.h -> src/ggml-metal.h
# ggml/src/ggml-metal.m -> src/ggml-metal.m
# ggml/src/ggml-quants.c -> src/ggml-quants.c
# ggml/src/ggml-quants.h -> src/ggml-quants.h
# ggml/src/ggml-rpc.cpp -> src/ggml-rpc.cpp
# ggml/src/ggml-rpc.h -> src/ggml-rpc.h
# ggml/src/ggml-sycl/* -> src/ggml-sycl/*
# ggml/src/ggml-sycl.cpp -> src/ggml-sycl.cpp
# ggml/src/ggml-sycl.h -> src/ggml-sycl.h
# ggml/src/ggml-vulkan.cpp -> src/ggml-vulkan.cpp
# ggml/src/ggml-vulkan.h -> src/ggml-vulkan.h
#
# ggml/include/ggml.h -> include/ggml.h
# ggml/include/ggml-alloc.h -> include/ggml-alloc.h
# ggml/include/ggml-backend.h -> include/ggml-backend.h
# ggml/include/ggml-blas.h -> include/ggml-blas.h
# ggml/include/ggml-cuda.h -> include/ggml-cuda.h
# ggml/include/ggml-kompute.h -> include/ggml-kompute.h
# ggml/include/ggml-metal.h -> include/ggml-metal.h
# ggml/include/ggml-rpc.h -> include/ggml-rpc.h
# ggml/include/ggml-sycl.h -> include/ggml-sycl.h
# ggml/include/ggml-vulkan.h -> include/ggml-vulkan.h
#
# examples/common.h -> examples/common.h
# examples/common.cpp -> examples/common.cpp
Expand All @@ -149,24 +150,25 @@ if [ -f $SRC_GGML/whisper-src.patch ]; then
-e 's/\/ggml\/src\/ggml-common\.h/\/src\/ggml-common.h/g' \
-e 's/\/ggml\/src\/ggml-cuda\//\/src\/ggml-cuda\//g' \
-e 's/\/ggml\/src\/ggml-cuda\.cu/\/src\/ggml-cuda.cu/g' \
-e 's/\/ggml\/src\/ggml-cuda\.h/\/src\/ggml-cuda.h/g' \
-e 's/\/ggml\/src\/ggml-impl\.h/\/src\/ggml-impl.h/g' \
-e 's/\/ggml\/src\/ggml-kompute\.cpp/\/src\/ggml-kompute.cpp/g' \
-e 's/\/ggml\/src\/ggml-kompute\.h/\/src\/ggml-kompute.h/g' \
-e 's/\/ggml\/src\/ggml-metal\.h/\/src\/ggml-metal.h/g' \
-e 's/\/ggml\/src\/ggml-metal\.m/\/src\/ggml-metal.m/g' \
-e 's/\/ggml\/src\/ggml-quants\.c/\/src\/ggml-quants.c/g' \
-e 's/\/ggml\/src\/ggml-quants\.h/\/src\/ggml-quants.h/g' \
-e 's/\/ggml\/src\/ggml-rpc\.cpp/\/src\/ggml-rpc.cpp/g' \
-e 's/\/ggml\/src\/ggml-rpc\.h/\/src\/ggml-rpc.h/g' \
-e 's/\/ggml\/src\/ggml-sycl\//\/src\/ggml-sycl\//g' \
-e 's/\/ggml\/src\/ggml-sycl\.cpp/\/src\/ggml-sycl.cpp/g' \
-e 's/\/ggml\/src\/ggml-sycl\.h/\/src\/ggml-sycl.h/g' \
-e 's/\/ggml\/src\/ggml-vulkan\.cpp/\/src\/ggml-vulkan.cpp/g' \
-e 's/\/ggml\/src\/ggml-vulkan\.h/\/src\/ggml-vulkan.h/g' \
-e 's/\/ggml\/include\/ggml\.h/\/include\/ggml.h/g' \
-e 's/\/ggml\/include\/ggml-alloc\.h/\/include\/ggml-alloc.h/g' \
-e 's/\/ggml\/include\/ggml-backend\.h/\/include\/ggml-backend.h/g' \
-e 's/\/ggml\/include\/ggml-blas\.h/\/include\/ggml-blas.h/g' \
-e 's/\/ggml\/include\/ggml-cuda\.h/\/include\/ggml-cuda.h/g' \
-e 's/\/ggml\/include\/ggml-kompute\.h/\/include\/ggml-kompute.h/g' \
-e 's/\/ggml\/include\/ggml-metal\.h/\/include\/ggml-metal.h/g' \
-e 's/\/ggml\/include\/ggml-rpc\.h/\/include\/ggml-rpc.h/g' \
-e 's/\/ggml\/include\/ggml-sycl\.h/\/include\/ggml-sycl.h/g' \
-e 's/\/ggml\/include\/ggml-vulkan\.h/\/include\/ggml-vulkan.h/g' \
-e 's/\/examples\/common\.h/\/examples\/common.h/g' \
-e 's/\/examples\/common\.cpp/\/examples\/common.cpp/g' \
-e 's/\/examples\/common-ggml\.h/\/examples\/common-ggml.h/g' \
Expand Down
13 changes: 7 additions & 6 deletions scripts/sync-whisper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,27 @@ cp -rpv ../whisper.cpp/ggml/src/ggml-blas.h src/ggml-blas.h
cp -rpv ../whisper.cpp/ggml/src/ggml-common.h src/ggml-common.h
cp -rpv ../whisper.cpp/ggml/src/ggml-cuda/* src/ggml-cuda/
cp -rpv ../whisper.cpp/ggml/src/ggml-cuda.cu src/ggml-cuda.cu
cp -rpv ../whisper.cpp/ggml/src/ggml-cuda.h src/ggml-cuda.h
cp -rpv ../whisper.cpp/ggml/src/ggml-impl.h src/ggml-impl.h
cp -rpv ../whisper.cpp/ggml/src/ggml-kompute.cpp src/ggml-kompute.cpp
cp -rpv ../whisper.cpp/ggml/src/ggml-kompute.h src/ggml-kompute.h
cp -rpv ../whisper.cpp/ggml/src/ggml-metal.h src/ggml-metal.h
cp -rpv ../whisper.cpp/ggml/src/ggml-metal.m src/ggml-metal.m
cp -rpv ../whisper.cpp/ggml/src/ggml-metal.metal src/ggml-metal.metal
cp -rpv ../whisper.cpp/ggml/src/ggml-quants.c src/ggml-quants.c
cp -rpv ../whisper.cpp/ggml/src/ggml-quants.h src/ggml-quants.h
cp -rpv ../whisper.cpp/ggml/src/ggml-rpc.cpp src/ggml-rpc.cpp
cp -rpv ../whisper.cpp/ggml/src/ggml-rpc.h src/ggml-rpc.h
cp -rpv ../whisper.cpp/ggml/src/ggml-sycl/* src/ggml-sycl/
cp -rpv ../whisper.cpp/ggml/src/ggml-sycl.cpp src/ggml-sycl.cpp
cp -rpv ../whisper.cpp/ggml/src/ggml-sycl.h src/ggml-sycl.h
cp -rpv ../whisper.cpp/ggml/src/ggml-vulkan.cpp src/ggml-vulkan.cpp
cp -rpv ../whisper.cpp/ggml/src/ggml-vulkan.h src/ggml-vulkan.h

cp -rpv ../whisper.cpp/ggml/include/ggml.h include/ggml.h
cp -rpv ../whisper.cpp/ggml/include/ggml-alloc.h include/ggml-alloc.h
cp -rpv ../whisper.cpp/ggml/include/ggml-backend.h include/ggml-backend.h
cp -rpv ../whisper.cpp/ggml/include/ggml-blas.h include/ggml-blas.h
cp -rpv ../whisper.cpp/ggml/include/ggml-cuda.h include/ggml-cuda.h
cp -rpv ../whisper.cpp/ggml/include/ggml-kompute.h include/ggml-kompute.h
cp -rpv ../whisper.cpp/ggml/include/ggml-metal.h include/ggml-metal.h
cp -rpv ../whisper.cpp/ggml/include/ggml-rpc.h include/ggml-rpc.h
cp -rpv ../whisper.cpp/ggml/include/ggml-sycl.h include/ggml-sycl.h
cp -rpv ../whisper.cpp/ggml/include/ggml-vulkan.h include/ggml-vulkan.h

cp -rpv ../whisper.cpp/examples/common.h examples/common.h
cp -rpv ../whisper.cpp/examples/common.cpp examples/common.cpp
Expand Down
1 change: 1 addition & 0 deletions spm-headers/ggml-metal.h
Loading

0 comments on commit a7b3103

Please sign in to comment.