Skip to content

Commit 9190e8e

Browse files
committed
llama : merge llama_internal.h into llama.h
Hide it behind an #ifdef
1 parent c85980a commit 9190e8e

File tree

6 files changed

+14
-16
lines changed

6 files changed

+14
-16
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ endif()
253253
add_library(llama
254254
llama.cpp
255255
llama.h
256-
llama_internal.h
257256
llama_util.h)
258257

259258
target_include_directories(llama PUBLIC .)

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ default: main quantize perplexity embedding
142142
ggml.o: ggml.c ggml.h
143143
$(CC) $(CFLAGS) -c ggml.c -o ggml.o
144144

145-
llama.o: llama.cpp llama.h llama_util.h llama_internal.h
145+
llama.o: llama.cpp llama.h llama_util.h
146146
$(CXX) $(CXXFLAGS) -c llama.cpp -o llama.o
147147

148148
common.o: examples/common.cpp examples/common.h

examples/quantize-stats/quantize-stats.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "ggml.h"
2+
3+
#define LLAMA_API_INTERNAL
24
#include "llama.h"
3-
#include "llama_internal.h"
45

56
#include <algorithm>
67
#include <cassert>

llama.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
#include "llama_util.h"
77
#include "llama.h"
8-
#include "llama_internal.h"
98

109
#include "ggml.h"
1110

llama.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,4 +179,15 @@ extern "C" {
179179
}
180180
#endif
181181

182+
// Internal API to be implemented by llama.cpp and used by tests/benchmarks only
183+
#ifdef LLAMA_API_INTERNAL
184+
185+
#include <vector>
186+
#include <string>
187+
struct ggml_tensor;
188+
189+
std::vector<std::pair<std::string, struct ggml_tensor *>>& llama_internal_get_tensor_map(struct llama_context * ctx);
190+
191+
#endif
192+
182193
#endif // LLAMA_H

llama_internal.h

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)