MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / common_params_get_system_info

Function common_params_get_system_info

smallthinker/common/common.cpp:366–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364}
365
366std::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

Callers 8

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 2

llama_print_system_infoFunction · 0.50
strMethod · 0.45

Tested by

no test coverage detected