From cc4efc5e4f36bdbe78f0cfa7536a3227946c6bff Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sat, 20 Apr 2024 13:01:35 +0300 Subject: [PATCH] common : another try --- common/common.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/common/common.cpp b/common/common.cpp index 61df199bd..b6143e41c 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -108,9 +108,7 @@ int32_t get_num_physical_cores() { return n_threads > 0 ? (n_threads <= 4 ? n_threads : n_threads / 2) : 4; } -// TODO: disabled until Android CI is fixed -// https://github.com/ggerganov/llama.cpp/pull/6780 -#if defined(__x86_64__) && defined(__linux__) && defined(__TMP_DISABLED__) +#if defined(__x86_64__) && defined(__linux__) && !defined(__ANDROID__) #include static void cpuid(unsigned leaf, unsigned subleaf, @@ -164,9 +162,7 @@ static int count_math_cpus(int cpu_count) { * Returns number of CPUs on system that are useful for math. */ int get_math_cpu_count() { -// TODO: disabled until Android CI is fixed -// https://github.com/ggerganov/llama.cpp/pull/6780 -#if defined(__x86_64__) && defined(__linux__) && defined(__TMP_DISABLED__) +#if defined(__x86_64__) && defined(__linux__) && !defined(__ANDROID__) int cpu_count = sysconf(_SC_NPROCESSORS_ONLN); if (cpu_count < 1) { return get_num_physical_cores();