From 87a6088ffe1ad281258d70cfa6b6153af30f11d0 Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Tue, 26 Mar 2024 10:52:33 -0400 Subject: [PATCH] rename unicodedata.{cpp,h} to unicode-data.{cpp,h} --- CMakeLists.txt | 2 +- Makefile | 4 ++-- Package.swift | 2 +- build.zig | 16 ++++++++-------- unicodedata.cpp => unicode-data.cpp | 2 +- unicodedata.h => unicode-data.h | 0 unicode.cpp | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) rename unicodedata.cpp => unicode-data.cpp (99%) rename unicodedata.h => unicode-data.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8782005bd..d9b4a0430 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1165,7 +1165,7 @@ add_library(llama llama.h unicode.h unicode.cpp - unicodedata.cpp + unicode-data.cpp ) target_include_directories(llama PUBLIC .) diff --git a/Makefile b/Makefile index bca7e7fe8..8cb21bc92 100644 --- a/Makefile +++ b/Makefile @@ -666,10 +666,10 @@ ggml-quants.o: ggml-quants.c ggml.h ggml-quants.h ggml-common.h unicode.o: unicode.cpp unicode.h $(CXX) $(CXXFLAGS) -c $< -o $@ -unicodedata.o: unicodedata.cpp unicodedata.h +unicode-data.o: unicode-data.cpp unicode-data.h $(CXX) $(CXXFLAGS) -c $< -o $@ -OBJS += ggml-alloc.o ggml-backend.o ggml-quants.o unicode.o unicodedata.o +OBJS += ggml-alloc.o ggml-backend.o ggml-quants.o unicode.o unicode-data.o llama.o: llama.cpp unicode.h ggml.h ggml-alloc.h ggml-backend.h ggml-cuda.h ggml-metal.h llama.h $(CXX) $(CXXFLAGS) -c $< -o $@ diff --git a/Package.swift b/Package.swift index a9af981d4..8b7195869 100644 --- a/Package.swift +++ b/Package.swift @@ -32,7 +32,7 @@ let package = Package( "ggml.c", "llama.cpp", "unicode.cpp", - "unicodedata.cpp", + "unicode-data.cpp", "ggml-alloc.c", "ggml-backend.c", "ggml-quants.c", diff --git a/build.zig b/build.zig index 82c2aa0cb..7f36e5968 100644 --- a/build.zig +++ b/build.zig @@ -116,7 +116,7 @@ pub fn build(b: *std.build.Builder) !void { const ggml_backend = make.obj("ggml-backend", "ggml-backend.c"); const ggml_quants = make.obj("ggml-quants", "ggml-quants.c"); const unicode = make.obj("unicode", "unicode.cpp"); - const unicodedata = make.obj("unicodedata", "unicodedata.cpp"); + const unicode_data = make.obj("unicode-data", "unicode-data.cpp"); const llama = make.obj("llama", "llama.cpp"); const buildinfo = make.obj("common", "common/build-info.cpp"); const common = make.obj("common", "common/common.cpp"); @@ -128,14 +128,14 @@ pub fn build(b: *std.build.Builder) !void { const clip = make.obj("clip", "examples/llava/clip.cpp"); const llava = make.obj("llava", "examples/llava/llava.cpp"); - _ = make.exe("main", "examples/main/main.cpp", &.{ ggml, ggml_alloc, ggml_backend, ggml_quants, llama, unicode, unicodedata, common, buildinfo, sampling, console, grammar_parser }); - _ = make.exe("quantize", "examples/quantize/quantize.cpp", &.{ ggml, ggml_alloc, ggml_backend, ggml_quants, llama, unicode, unicodedata, common, buildinfo }); - _ = make.exe("perplexity", "examples/perplexity/perplexity.cpp", &.{ ggml, ggml_alloc, ggml_backend, ggml_quants, llama, unicode, unicodedata, common, buildinfo }); - _ = make.exe("embedding", "examples/embedding/embedding.cpp", &.{ ggml, ggml_alloc, ggml_backend, ggml_quants, llama, unicode, unicodedata, common, buildinfo }); - _ = make.exe("finetune", "examples/finetune/finetune.cpp", &.{ ggml, ggml_alloc, ggml_backend, ggml_quants, llama, unicode, unicodedata, common, buildinfo, train }); - _ = make.exe("train-text-from-scratch", "examples/train-text-from-scratch/train-text-from-scratch.cpp", &.{ ggml, ggml_alloc, ggml_backend, ggml_quants, llama, unicode, unicodedata, common, buildinfo, train }); + _ = make.exe("main", "examples/main/main.cpp", &.{ ggml, ggml_alloc, ggml_backend, ggml_quants, llama, unicode, unicode_data, common, buildinfo, sampling, console, grammar_parser }); + _ = make.exe("quantize", "examples/quantize/quantize.cpp", &.{ ggml, ggml_alloc, ggml_backend, ggml_quants, llama, unicode, unicode_data, common, buildinfo }); + _ = make.exe("perplexity", "examples/perplexity/perplexity.cpp", &.{ ggml, ggml_alloc, ggml_backend, ggml_quants, llama, unicode, unicode_data, common, buildinfo }); + _ = make.exe("embedding", "examples/embedding/embedding.cpp", &.{ ggml, ggml_alloc, ggml_backend, ggml_quants, llama, unicode, unicode_data, common, buildinfo }); + _ = make.exe("finetune", "examples/finetune/finetune.cpp", &.{ ggml, ggml_alloc, ggml_backend, ggml_quants, llama, unicode, unicode_data, common, buildinfo, train }); + _ = make.exe("train-text-from-scratch", "examples/train-text-from-scratch/train-text-from-scratch.cpp", &.{ ggml, ggml_alloc, ggml_backend, ggml_quants, llama, unicode, unicode_data, common, buildinfo, train }); - const server = make.exe("server", "examples/server/server.cpp", &.{ ggml, ggml_alloc, ggml_backend, ggml_quants, llama, unicode, unicodedata, common, buildinfo, sampling, grammar_parser, json_schema_to_grammar, clip, llava }); + const server = make.exe("server", "examples/server/server.cpp", &.{ ggml, ggml_alloc, ggml_backend, ggml_quants, llama, unicode, unicode_data, common, buildinfo, sampling, grammar_parser, json_schema_to_grammar, clip, llava }); if (server.target.isWindows()) { server.linkSystemLibrary("ws2_32"); } diff --git a/unicodedata.cpp b/unicode-data.cpp similarity index 99% rename from unicodedata.cpp rename to unicode-data.cpp index 74e477aa3..22f8b0f0b 100644 --- a/unicodedata.cpp +++ b/unicode-data.cpp @@ -1,4 +1,4 @@ -#include "unicodedata.h" +#include "unicode-data.h" #include #include diff --git a/unicodedata.h b/unicode-data.h similarity index 100% rename from unicodedata.h rename to unicode-data.h diff --git a/unicode.cpp b/unicode.cpp index 84a29fa53..df8c5f581 100644 --- a/unicode.cpp +++ b/unicode.cpp @@ -1,5 +1,5 @@ #include "unicode.h" -#include "unicodedata.h" +#include "unicode-data.h" #include #include