]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
examples: add missing <ctime> include for time() (#1011)
authorPavol Rusnak <redacted>
Sun, 16 Apr 2023 10:13:00 +0000 (12:13 +0200)
committerGitHub <redacted>
Sun, 16 Apr 2023 10:13:00 +0000 (10:13 +0000)
examples/embedding/embedding.cpp
examples/main/main.cpp
examples/perplexity/perplexity.cpp

index 2eda3ac01b9c6ebf991e448ebec4193b457e4654..e10de619c9d5fa5439ca67d792ca4cb8c0c91d92 100644 (file)
@@ -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";
index ba153cb82dcf672cd3954f22531dc36ef13d83d1..3e4b0034ee977bbe13e8fb02edb23f355be90ea8 100644 (file)
@@ -11,6 +11,7 @@
 #include <cmath>
 #include <cstdio>
 #include <cstring>
+#include <ctime>
 #include <fstream>
 #include <iostream>
 #include <string>
index 38e3643b1ca5eb5f96a59f58d4a7720566eb988c..19449e16e4d54785bd9d498f493077d8b4578028 100644 (file)
@@ -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());