]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
ggml : init time on first ggml_init() call
authorGeorgi Gerganov <redacted>
Wed, 29 Mar 2023 19:15:34 +0000 (22:15 +0300)
committerGeorgi Gerganov <redacted>
Wed, 29 Mar 2023 19:15:34 +0000 (22:15 +0300)
ggml.c

diff --git a/ggml.c b/ggml.c
index ccdba30e09057eb7fb3c04c43bd3b1f09154b6b1..02675ee67072d7668c3c018733cda1ca18927688 100644 (file)
--- a/ggml.c
+++ b/ggml.c
@@ -2748,6 +2748,9 @@ struct ggml_context * ggml_init(struct ggml_init_params params) {
     static bool is_first_call = true;
 
     if (is_first_call) {
+        // initialize time system (required on Windows)
+        ggml_time_init();
+
         // initialize GELU, SILU and EXP F32 tables
         {
             const uint64_t t_start = ggml_time_us(); UNUSED(t_start);