diff --git a/Makefile b/Makefile index 76f2955..9940f54 100644 --- a/Makefile +++ b/Makefile @@ -17,8 +17,7 @@ include whisper.cpp/BUILD.mk # the root package is `o//` by default # building a package also builds its sub-packages .PHONY: o/$(MODE)/ -#o/$(MODE)/: o/$(MODE)/llama.cpp o/$(MODE)/llamafile -o/$(MODE)/: o/$(MODE)/llama.cpp o/$(MODE)/whisper.cpp o/$(MODE)/llamafile +o/$(MODE)/: o/$(MODE)/whisper.cpp o/$(MODE)/llamafile # for installing to `make PREFIX=/usr/local` .PHONY: install diff --git a/llamafile/copy.sh b/llamafile/copy.sh index 63ff96f..9cf72b0 100755 --- a/llamafile/copy.sh +++ b/llamafile/copy.sh @@ -3,14 +3,14 @@ set -x HOST=${1:?HOST} ssh $HOST mkdir -p lfbuild -scp llama.cpp/ggml-cuda.cu \ - llama.cpp/ggml-cuda.h \ - llama.cpp/ggml-impl.h \ - llama.cpp/ggml-alloc.h \ - llama.cpp/ggml-common.h \ - llama.cpp/ggml-backend.h \ - llama.cpp/ggml-backend-impl.h \ - llama.cpp/ggml.h \ +scp whisper.cpp/ggml-cuda.cu \ + whisper.cpp/ggml-cuda.h \ + whisper.cpp/ggml-impl.h \ + whisper.cpp/ggml-alloc.h \ + whisper.cpp/ggml-common.h \ + whisper.cpp/ggml-backend.h \ + whisper.cpp/ggml-backend-impl.h \ + whisper.cpp/ggml.h \ llamafile/tinyblas.h \ llamafile/tinyblas.cu \ llamafile/llamafile.h \ diff --git a/llamafile/cuda.sh b/llamafile/cuda.sh index fc4d0c3..aa1b210 100755 --- a/llamafile/cuda.sh +++ b/llamafile/cuda.sh @@ -2,14 +2,14 @@ TMP=$(mktemp -d) || exit -cp llama.cpp/ggml-cuda.cu \ - llama.cpp/ggml-cuda.h \ - llama.cpp/ggml-impl.h \ - llama.cpp/ggml-alloc.h \ - llama.cpp/ggml-common.h \ - llama.cpp/ggml-backend.h \ - llama.cpp/ggml-backend-impl.h \ - llama.cpp/ggml.h \ +cp whisper.cpp/ggml-cuda.cu \ + whisper.cpp/ggml-cuda.h \ + whisper.cpp/ggml-impl.h \ + whisper.cpp/ggml-alloc.h \ + whisper.cpp/ggml-common.h \ + whisper.cpp/ggml-backend.h \ + whisper.cpp/ggml-backend-impl.h \ + whisper.cpp/ggml.h \ llamafile/tinyblas.h \ llamafile/tinyblas.cu \ llamafile/llamafile.h \ diff --git a/whisper.cpp/ggml-quants.py b/whisper.cpp/ggml-quants.py index 9a9d0fd..dcf378a 100644 --- a/whisper.cpp/ggml-quants.py +++ b/whisper.cpp/ggml-quants.py @@ -1,6 +1,6 @@ import re -with open('llama.cpp/ggml-quants.h') as f: +with open('whisper.cpp/ggml-quants.h') as f: prototypes = f.read() prototypes = [line.replace(';', '') for line in prototypes.split('\n') if line.endswith(';') and not line.startswith('//')] @@ -19,7 +19,7 @@ ) for arch, mac, needs in ARCHS: - path = 'llama.cpp/ggml-quants-%s.c' % (arch.replace('_', '-')) + path = 'whisper.cpp/ggml-quants-%s.c' % (arch.replace('_', '-')) with open(path, 'w') as f: f.write('#ifdef %s\n' % (mac)) for func, proto in FUNCS: @@ -27,7 +27,7 @@ f.write('#include "ggml-quants.inc"\n') f.write('#endif // %s\n' % (mac)) -with open('llama.cpp/ggml-quants.cpp', 'w') as f: +with open('whisper.cpp/ggml-quants.cpp', 'w') as f: f.write('#include \n') f.write('#include \n') f.write('#include \n') diff --git a/whisper.cpp/ggml-vector.py b/whisper.cpp/ggml-vector.py index 31f2042..70d4fbb 100644 --- a/whisper.cpp/ggml-vector.py +++ b/whisper.cpp/ggml-vector.py @@ -1,6 +1,6 @@ import re -with open('llama.cpp/ggml-vector.h') as f: +with open('whisper.cpp/ggml-vector.h') as f: prototypes = f.read() prototypes = [line.replace(';', '') for line in prototypes.split('\n') if line.endswith(';') and not line.startswith('//') and '(' in line] @@ -23,7 +23,7 @@ ) for arch, mac, needs in ARCHS: - path = 'llama.cpp/ggml-vector-%s.c' % (arch.replace('_', '-')) + path = 'whisper.cpp/ggml-vector-%s.c' % (arch.replace('_', '-')) with open(path, 'w') as f: f.write('#ifdef %s\n' % (mac)) for func, proto in FUNCS: @@ -32,7 +32,7 @@ f.write('#include "ggml-vector.inc"\n') f.write('#endif // %s\n' % (mac)) -with open('llama.cpp/ggml-vector.cpp', 'w') as f: +with open('whisper.cpp/ggml-vector.cpp', 'w') as f: f.write('#include \n') f.write('#include \n') f.write('#include \n')