File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 6
6
#include " write_file.h"
7
7
#include < thread>
8
8
9
+ class tts_timing_printer {
10
+ const int64_t start_us{[] {
11
+ ggml_time_init ();
12
+ return ggml_time_us ();
13
+ }()};
14
+ public:
15
+ ~tts_timing_printer () {
16
+ const int64_t end_us{ggml_time_us ()};
17
+ // Just a simple "total time" for now before adding "load" / "prompt eval" / "eval" from llama_print_timings
18
+ printf (" total time = %.2f ms\n " , (end_us - start_us) / 1000 .0f );
19
+ }
20
+ };
21
+
9
22
int main (int argc, const char ** argv) {
23
+ const tts_timing_printer _{};
10
24
float default_temperature = 1 .0f ;
11
25
int default_n_threads = std::max ((int )std::thread::hardware_concurrency (), 1 );
12
26
int default_top_k = 50 ;
@@ -34,7 +48,7 @@ int main(int argc, const char ** argv) {
34
48
args.parse (argc, argv);
35
49
if (args.for_help ) {
36
50
args.help ();
37
- return 0 ;
51
+ exit ( 0 ) ;
38
52
}
39
53
args.validate ();
40
54
You can’t perform that action at this time.
0 commit comments