Explorar el Código

examples: add missing <ctime> include for time() (#1011)

Pavol Rusnak hace 2 años
padre
commit
489537e6cf

+ 2 - 0
examples/embedding/embedding.cpp

@@ -1,6 +1,8 @@
 #include "common.h"
 #include "llama.h"
 
+#include <ctime>
+
 int main(int argc, char ** argv) {
     gpt_params params;
     params.model = "models/llama-7B/ggml-model.bin";

+ 1 - 0
examples/main/main.cpp

@@ -11,6 +11,7 @@
 #include <cmath>
 #include <cstdio>
 #include <cstring>
+#include <ctime>
 #include <fstream>
 #include <iostream>
 #include <string>

+ 1 - 0
examples/perplexity/perplexity.cpp

@@ -2,6 +2,7 @@
 #include "llama.h"
 
 #include <cmath>
+#include <ctime>
 
 std::vector<float> softmax(const std::vector<float>& logits) {
     std::vector<float> probs(logits.size());