8000 llama : move end-user examples to tools directory · ggml-org/llama.cpp@d1a4593 · GitHub
[go: up one dir, main page]

Skip to content

Commit d1a4593

Browse files
committed
llama : move end-user examples to tools directory
ggml-ci
1 parent d24d592 commit d1a4593

File tree

181 files changed

+44
-22
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+44
-22
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ option(LLAMA_BUILD_COMMON "llama: build common utils library" ${LLAMA_STANDALONE
7777

7878
# extra artifacts
7979
option(LLAMA_BUILD_TESTS "llama: build tests" ${LLAMA_STANDALONE})
80+
option(LLAMA_BUILD_TOOLS "llama: build tools" ${LLAMA_STANDALONE})
8081
option(LLAMA_BUILD_EXAMPLES "llama: build examples" ${LLAMA_STANDALONE})
8182
option(LLAMA_BUILD_SERVER "llama: build server example" ${LLAMA_STANDALONE})
8283

@@ -187,6 +188,10 @@ if (LLAMA_BUILD_COMMON AND LLAMA_BUILD_EXAMPLES)
187188
add_subdirectory(pocs)
188189
endif()
189190

191+
if (LLAMA_BUILD_COMMON AND LLAMA_BUILD_TOOLS)
192+
add_subdirectory(tools)
193+
endif()
194+
190195
#
191196
# install
192197
#

examples/CMakeLists.txt

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,51 +12,29 @@ llama_add_compile_flags()
1212

1313
# examples
1414

15-
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
16-
1715
if (EMSCRIPTEN)
1816
else()
19-
add_subdirectory(batched-bench)
2017
add_subdirectory(batched)
2118
add_subdirectory(embedding)
2219
add_subdirectory(eval-callback)
2320

2421
add_subdirectory(gguf-hash)
25-
add_subdirectory(gguf-split)
2622
add_subdirectory(gguf)
2723
add_subdirectory(gritlm)
28-
add_subdirectory(imatrix)
2924
add_subdirectory(infill)
30-
add_subdirectory(llama-bench)
3125
add_subdirectory(lookahead)
3226
add_subdirectory(lookup)
33-
add_subdirectory(main)
3427
add_subdirectory(parallel)
3528
add_subdirectory(passkey)
36-
add_subdirectory(perplexity)
37-
add_subdirectory(quantize)
3829
add_subdirectory(retrieval)
39-
if (LLAMA_BUILD_SERVER)
40-
add_subdirectory(server)
41-
endif()
4230
add_subdirectory(save-load-state)
43-
add_subdirectory(run)
4431
add_subdirectory(simple)
4532
add_subdirectory(simple-chat)
4633
add_subdirectory(speculative)
4734
add_subdirectory(speculative-simple)
48-
add_subdirectory(tokenize)
49-
add_subdirectory(tts)
5035
add_subdirectory(gen-docs)
5136
if (NOT GGML_BACKEND_DL)
5237
# these examples use the backends directly and cannot be built with dynamic loading
53-
add_subdirectory(convert-llama2c-to-ggml)
54-
add_subdirectory(cvector-generator)
55-
add_subdirectory(export-lora)
56-
add_subdirectory(llava)
57-
if (GGML_RPC)
58-
add_subdirectory(rpc)
59-
endif()
6038
if (GGML_SYCL)
6139
add_subdirectory(sycl)
6240
endif()

tools/CMakeLists.txt

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# dependencies
2+
3+
find_package(Threads REQUIRED)
4+
5+
# third-party
6+
7+
# ...
8+
9+
# flags
10+
11+
llama_add_compile_flags()
12+
13+
# examples
14+
15+
if (EMSCRIPTEN)
16+
else()
17+
add_subdirectory(batched-bench)
18+
add_subdirectory(gguf-split)
19+
add_subdirectory(imatrix)
20+
add_subdirectory(llama-bench)
21+
add_subdirectory(main)
22+
add_subdirectory(perplexity)
23+
add_subdirectory(quantize)
24+
if (LLAMA_BUILD_SERVER)
25+
add_subdirectory(server)
26+
endif()
27+
add_subdirectory(run)
28+
add_subdirectory(tokenize)
29+
add_subdirectory(tts)
30+
if (NOT GGML_BACKEND_DL)
31+
# these examples use the backends directly and cannot be built with dynamic loading
32+
add_subdirectory(cvector-generator)
33+
add_subdirectory(export-lora)
34+
add_subdirectory(llava)
35+
if (GGML_RPC)
36+
add_subdirectory(rpc)
37+
endif()
38+
endif()
39+
endif()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed wi 341A thout changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)
0