Skip to content

Commit 214007c

Browse files
ggerganovNeoZhangJianyu
authored andcommitted
llama : remove unused headers (ggml-org#11109)
ggml-ci
1 parent 8d2ac4a commit 214007c

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/llama.cpp

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include "llama-kv-cache.h"
99
#include "llama-model-loader.h"
1010
#include "llama-model.h"
11-
#include "llama-quant.h"
1211

1312
#include "ggml.h"
1413
#include "ggml-alloc.h"
@@ -18,23 +17,16 @@
1817
#include <algorithm>
1918
#include <array>
2019
#include <cassert>
21-
#include <cctype>
2220
#include <cfloat>
23-
#include <cinttypes>
24-
#include <climits>
2521
#include <cmath>
26-
#include <cstdarg>
2722
#include <cstddef>
2823
#include <cstdint>
2924
#include <cstdio>
3025
#include <cstring>
3126
#include <ctime>
3227
#include <functional>
3328
#include <initializer_list>
34-
#include <locale>
3529
#include <map>
36-
#include <numeric>
37-
#include <type_traits>
3830

3931
#if defined(GGML_USE_SYCL)
4032
# include "ggml-sycl.h"
@@ -12443,16 +12435,16 @@ int llama_split_path(char * split_path, size_t maxlen, const char * path_prefix,
1244312435
return 0;
1244412436
}
1244512437

12446-
int llama_split_prefix(char * dest, size_t maxlen, const char * split_path, int split_no, int split_count) {
12438+
int llama_split_prefix(char * split_prefix, size_t maxlen, const char * split_path, int split_no, int split_count) {
1244712439
std::string str_split_path(split_path);
1244812440
char postfix[32];
1244912441
snprintf(postfix, 32, "-%05d-of-%05d.gguf", split_no + 1, split_count);
1245012442
std::string str_postfix(postfix);
1245112443

12452-
// check if dest ends with postfix
12444+
// check if split_prefix ends with postfix
1245312445
int size_prefix = str_split_path.size() - str_postfix.size();
1245412446
if (size_prefix > 0 && str_split_path.find(str_postfix, size_prefix) != std::string::npos) {
12455-
snprintf(dest, std::min((size_t) size_prefix + 1, maxlen), "%s", split_path);
12447+
snprintf(split_prefix, std::min((size_t) size_prefix + 1, maxlen), "%s", split_path);
1245612448
return size_prefix;
1245712449
}
1245812450

0 commit comments

Comments
 (0)