diff --git a/common/common.cpp b/common/common.cpp index db3bdc0f54..f75aa1a316 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -102,7 +102,7 @@ int32_t cpu_get_num_physical_cores() { if (result == 0) { return num_physical_cores; } -#elif defined(_WIN32) && (_WIN32_WINNT >= 0x0601) && !defined(__MINGW64__) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && !defined(LLAMA_UWP) // windows 7 and later +#elif defined(_WIN32) && (_WIN32_WINNT >= 0x0601) && !defined(__MINGW64__) // windows 7 and later // TODO: windows + arm64 + mingw64 unsigned int n_threads_win = std::thread::hardware_concurrency(); unsigned int default_threads = n_threads_win > 0 ? (n_threads_win <= 4 ? n_threads_win : n_threads_win / 2) : 4; @@ -382,7 +382,7 @@ std::string common_params_get_system_info(const common_params & params) { if (params.cpuparams_batch.n_threads != -1) { os << " (n_threads_batch = " << params.cpuparams_batch.n_threads << ")"; } -#if defined(_WIN32) && (_WIN32_WINNT >= 0x0601) && !defined(__MINGW64__) // windows 7 and later +#if defined(_WIN32) && (_WIN32_WINNT >= 0x0601) && !defined(__MINGW64__) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && !defined(LLAMA_UWP) // windows 7 and later // TODO: windows + arm64 + mingw64 DWORD logicalProcessorCount = GetActiveProcessorCount(ALL_PROCESSOR_GROUPS); os << " / " << logicalProcessorCount << " | " << llama_print_system_info();