| 364 | } |
| 365 | |
| 366 | std::string common_params_get_system_info(const common_params & params) { |
| 367 | std::ostringstream os; |
| 368 | |
| 369 | os << "system_info: n_threads = " << params.cpuparams.n_threads; |
| 370 | if (params.cpuparams_batch.n_threads != -1) { |
| 371 | os << " (n_threads_batch = " << params.cpuparams_batch.n_threads << ")"; |
| 372 | } |
| 373 | #if defined(_WIN32) && (_WIN32_WINNT >= 0x0601) && !defined(__MINGW64__) // windows 7 and later |
| 374 | // TODO: windows + arm64 + mingw64 |
| 375 | DWORD logicalProcessorCount = GetActiveProcessorCount(ALL_PROCESSOR_GROUPS); |
| 376 | os << " / " << logicalProcessorCount << " | " << llama_print_system_info(); |
| 377 | #else |
| 378 | os << " / " << std::thread::hardware_concurrency() << " | " << llama_print_system_info(); |
| 379 | #endif |
| 380 | |
| 381 | return os.str(); |
| 382 | } |
| 383 | |
| 384 | // |
| 385 | // String utils |