Skip to content

Commit c984214

Browse files
committed
build : add headers
ggml-ci
1 parent 5449c17 commit c984214

File tree

10 files changed

+24
-8
lines changed

10 files changed

+24
-8
lines changed

common/log.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#include "log.h"
22

33
#include <condition_variable>
4+
#include <cstdarg>
45
#include <cstdio>
56
#include <mutex>
67
#include <thread>
8+
#include <vector>
79

810
int gpt_log_verbosity_env = getenv("LLAMA_LOG") ? atoi(getenv("LLAMA_LOG")) : LOG_DEFAULT_LLAMA;
911

@@ -84,7 +86,7 @@ struct gpt_log_entry {
8486
fprintf(fcur, "%s", msg.data());
8587

8688
if (level == GGML_LOG_LEVEL_WARN || level == GGML_LOG_LEVEL_ERROR || level == GGML_LOG_LEVEL_DEBUG) {
87-
fprintf(fcur, LOG_COL_DEFAULT);
89+
fprintf(fcur, "%s", LOG_COL_DEFAULT);
8890
}
8991

9092
fflush(fcur);

common/train.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#include "train.h"
22
#include "common.h"
33

4+
#include <algorithm>
45
#include <random>
56
#include <sstream>
67
#include <functional>
8+
#include <cstring>
79

810
struct random_normal_distribution {
911
std::mt19937 gen;

examples/cvector-generator/cvector-generator.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313
#include "ggml-metal.h"
1414
#endif
1515

16+
#include <algorithm>
17+
#include <climits>
1618
#include <cstdio>
19+
#include <cstring>
20+
#include <fstream>
21+
#include <iostream>
1722
#include <string>
1823
#include <tuple>
1924
#include <vector>
20-
#include <algorithm>
21-
#include <iostream>
22-
#include <fstream>
23-
#include <climits>
2425

2526

2627
//////////////////////////////////////////////////

examples/llava/llava-cli.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <cstdio>
1212
#include <cstdlib>
13+
#include <cstring>
1314
#include <vector>
1415

1516
static bool eval_tokens(struct llama_context * ctx_llama, std::vector<llama_token> tokens, int n_batch, int * n_past) {

examples/llava/llava.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@
77

88
#include "llama.h"
99

10+
#include <algorithm>
1011
#include <cstdio>
1112
#include <cstdlib>
12-
#include <vector>
13+
#include <cstring>
14+
#include <limits>
1315
#include <numeric>
16+
#include <vector>
1417

1518
// RGB uint8 image
1619
struct clip_image_u8 {

examples/llava/minicpmv-cli.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
#include "llama.h"
88
#include "ggml.h"
99

10+
#include <algorithm>
1011
#include <cstdio>
1112
#include <cstdlib>
13+
#include <cstring>
1214
#include <vector>
1315
#include <iostream> // TODO: remove me
1416

examples/perplexity/perplexity.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "log.h"
44
#include "llama.h"
55

6+
#include <algorithm>
67
#include <array>
78
#include <atomic>
89
#include <cmath>

examples/speculative/speculative.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
#include "log.h"
55
#include "llama.h"
66

7+
#include <algorithm>
78
#include <cstdio>
9+
#include <cstring>
10+
#include <random>
11+
#include <set>
812
#include <string>
913
#include <vector>
10-
#include <set>
11-
#include <random>
1214

1315
#define SPEC_VOCAB_MAX_SIZE_DIFFERENCE 100
1416
#define SPEC_VOCAB_CHECK_START_TOKEN_ID 5

examples/tokenize/tokenize.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "llama.h"
44

55
#include <cstdio>
6+
#include <cstring>
67
#include <fstream>
78
#include <string>
89
#include <vector>

tests/test-log.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "log.h"
22

3+
#include <cstdlib>
34
#include <thread>
45

56
int main() {

0 commit comments

Comments
 (0)