]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
examples : call ggml_time_init() (close #166)
authorGeorgi Gerganov <redacted>
Sat, 20 May 2023 14:09:41 +0000 (17:09 +0300)
committerGeorgi Gerganov <redacted>
Sat, 20 May 2023 14:09:41 +0000 (17:09 +0300)
examples/dolly-v2/main.cpp
examples/gpt-2/main.cpp
examples/gpt-j/main.cpp
examples/gpt-neox/main.cpp
examples/mnist/main.cpp
examples/mpt/main.cpp
examples/replit/main.cpp
examples/starcoder/main.cpp

index d693296bfd97cc8927bb809e79de6aa1e984210e..305093fe99c5d3ebdad876c4b71cf81dbd8dcede 100644 (file)
@@ -651,6 +651,8 @@ bool dollyv2_eval(
 }
 
 int main(int argc, char ** argv) {
+    ggml_time_init();
+
     const int64_t t_main_start_us = ggml_time_us();
 
     gpt_params params;
index d8f4bdd7e5dcd5cf857be9e8efef4d73809feea3..7d83b710ef8dcf23ced203df8dbe0a9ced21a811 100644 (file)
@@ -694,6 +694,8 @@ bool gpt2_eval(
 }
 
 int main(int argc, char ** argv) {
+    ggml_time_init();
+
     const int64_t t_main_start_us = ggml_time_us();
 
     gpt_params params;
index d8e37c80ad1ae472712000961848f4f918ba9c53..860d63798c2b2e00fa2530a929bfc3c7264ead30 100644 (file)
@@ -603,6 +603,8 @@ bool gptj_eval(
 }
 
 int main(int argc, char ** argv) {
+    ggml_time_init();
+
     const int64_t t_main_start_us = ggml_time_us();
 
     gpt_params params;
index bd8144930fee666c015f915003cbcdee5d37c8f5..52f4b0609c52835109ec14a596a145975f10be6b 100644 (file)
@@ -650,6 +650,8 @@ bool gpt_neox_eval(
 }
 
 int main(int argc, char ** argv) {
+    ggml_time_init();
+
     const int64_t t_main_start_us = ggml_time_us();
 
     gpt_params params;
index 69df5eadf9e24f059b38dd2d91d96fe4ba551f1d..b78ac460cf994fb2b67ec2ddc4bdef364b929686 100644 (file)
@@ -199,6 +199,7 @@ int mnist_eval(
 }
 
 int main(int argc, char ** argv) {
+    ggml_time_init();
 
     if (argc != 3) {
         fprintf(stderr, "Usage: %s models/mnist/ggml-model-f32.bin models/mnist/t10k-images.idx3-ubyte\n", argv[0]);
index 5a60367a331a542090006951dae19da6c40c97f6..44da38300a94f107cad88ba451dffe64c35bf6db 100644 (file)
@@ -531,6 +531,8 @@ bool mpt_eval(const mpt_model & model, const int n_threads, const int n_past,
 }
 
 int main(int argc, char ** argv) {
+    ggml_time_init();
+
     const int64_t t_main_start_us = ggml_time_us();
 
     gpt_params params;
index e01db755155d987c51b892a13f133e5e33bed848..96e13559d7f34807509f97f014c9ed41a76db0d2 100644 (file)
@@ -618,6 +618,8 @@ bool replit_eval(const replit_model & model, const int n_threads, const int n_pa
 }
 
 int main(int argc, char ** argv) {
+    ggml_time_init();
+
     const int64_t t_main_start_us = ggml_time_us();
 
     gpt_params params;
index a4608225d5269a6102f09d760aa631e8b0cdc8e5..e43f9923634c2adafaf8f7dd400f9943ee0e2752 100644 (file)
@@ -704,6 +704,8 @@ bool starcoder_eval(
 }
 
 int main(int argc, char ** argv) {
+    ggml_time_init();
+
     const int64_t t_main_start_us = ggml_time_us();
 
     gpt_params params;