Skip to content

Commit eee8b28

Browse files
authored
Merge pull request ggml-org#20 from SlyEcho/server_refactor
Logging changes
2 parents bac0ddb + 6518f9c commit eee8b28

File tree

4 files changed

+214
-223
lines changed

4 files changed

+214
-223
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ models/*
3434
/embedding
3535
/benchmark-matmult
3636
/vdot
37+
/server
3738
/Pipfile
3839
/libllama.so
3940

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ BUILD_TARGETS = main quantize quantize-stats perplexity embedding vdot
33

44
ifdef LLAMA_BUILD_SERVER
55
BUILD_TARGETS += server
6+
LLAMA_SERVER_VERBOSE ?= 1
7+
server: CXXFLAGS += -DSERVER_VERBOSE=$(LLAMA_SERVER_VERBOSE)
68
endif
79

810
default: $(BUILD_TARGETS)

examples/server/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
set(TARGET server)
2+
option(LLAMA_SERVER_VERBOSE "Build verbose logging option for Server" ON)
23
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
34
add_executable(${TARGET} server.cpp json.hpp httplib.h)
45
target_compile_definitions(${TARGET} PRIVATE
@@ -8,6 +9,8 @@ target_compile_definitions(${TARGET} PRIVATE
89
$<$<CONFIG:Debug>:
910
CPPHTTPLIB_NO_EXCEPTIONS=1
1011
>
12+
13+
SERVER_VERBOSE=$<BOOL:${LLAMA_SERVER_VERBOSE}>
1114
)
1215
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
1316
target_compile_features(${TARGET} PRIVATE cxx_std_11)

0 commit comments

Comments
 (0)