@@ -765,6 +765,26 @@ void sigint_handler(int signo) {
765
765
}
766
766
#endif
767
767
768
+ const char * llama_print_system_info (void ) {
769
+ static std::string s;
770
+
771
+ s = " " ;
772
+ s += " AVX = " + std::to_string (ggml_cpu_has_avx ()) + " | " ;
773
+ s += " AVX2 = " + std::to_string (ggml_cpu_has_avx2 ()) + " | " ;
774
+ s += " AVX512 = " + std::to_string (ggml_cpu_has_avx512 ()) + " | " ;
775
+ s += " FMA = " + std::to_string (ggml_cpu_has_fma ()) + " | " ;
776
+ s += " NEON = " + std::to_string (ggml_cpu_has_neon ()) + " | " ;
777
+ s += " ARM_FMA = " + std::to_string (ggml_cpu_has_arm_fma ()) + " | " ;
778
+ s += " F16C = " + std::to_string (ggml_cpu_has_f16c ()) + " | " ;
779
+ s += " FP16_VA = " + std::to_string (ggml_cpu_has_fp16_va ()) + " | " ;
780
+ s += " WASM_SIMD = " + std::to_string (ggml_cpu_has_wasm_simd ()) + " | " ;
781
+ s += " BLAS = " + std::to_string (ggml_cpu_has_blas ()) + " | " ;
782
+ s += " SSE3 = " + std::to_string (ggml_cpu_has_sse3 ()) + " | " ;
783
+ s += " VSX = " + std::to_string (ggml_cpu_has_vsx ()) + " | " ;
784
+
785
+ return s.c_str ();
786
+ }
787
+
768
788
int main (int argc, char ** argv) {
769
789
ggml_time_init ();
770
790
const int64_t t_main_start_us = ggml_time_us ();
@@ -807,6 +827,13 @@ int main(int argc, char ** argv) {
807
827
t_load_us = ggml_time_us () - t_start_us;
808
828
}
809
829
830
+ // print system information
831
+ {
832
+ fprintf (stderr, " \n " );
833
+ fprintf (stderr, " system_info: n_threads = %d / %d | %s\n " ,
834
+ params.n_threads , std::thread::hardware_concurrency (), llama_print_system_info ());
835
+ }
836
+
810
837
int n_past = 0 ;
811
838
812
839
int64_t t_sample_us = 0 ;
@@ -834,7 +861,7 @@ int main(int argc, char ** argv) {
834
861
struct sigaction sigint_action;
835
862
sigint_action.sa_handler = sigint_handler;
836
863
sigemptyset (&sigint_action.sa_mask );
837
- sigint_action.sa_flags = 0 ;
864
+ sigint_action.sa_flags = 0 ;
838
865
sigaction (SIGINT, &sigint_action, NULL );
839
866
#endif
840
867
@@ -967,7 +994,7 @@ int main(int argc, char ** argv) {
967
994
is_interacting = true ;
968
995
}
969
996
if (is_interacting) {
970
- // currently being interactive
997
+ // currently being interactive
971
998
bool another_line=true ;
972
999
while (another_line) {
973
1000
fflush (stdout);
@@ -999,7 +1026,7 @@ int main(int argc, char ** argv) {
999
1026
input_noecho = true ; // do not echo this again
1000
1027
}
1001
1028
1002
- is_interacting = false ;
1029
+ is_interacting = false ;
1003
1030
}
1004
1031
}
1005
1032
0 commit comments