Skip to content

Commit

Permalink
examples: add missing <ctime> include for time() (ggerganov#1011)
Browse files Browse the repository at this point in the history
  • Loading branch information
prusnak committed Apr 16, 2023
1 parent 2d3481c commit 489537e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/embedding/embedding.cpp
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
1 change: 1 addition & 0 deletions examples/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iostream>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions examples/perplexity/perplexity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 489537e

Please sign in to comment.