Skip to content

Commit

Permalink
common : disable get_math_cpu_count() until Android CI gets fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Apr 20, 2024
1 parent 0e4802b commit 0a86385
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions common/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ int32_t get_num_physical_cores() {
return n_threads > 0 ? (n_threads <= 4 ? n_threads : n_threads / 2) : 4;
}

#if defined(__x86_64__) && defined(__linux__)
// TODO: disabled until Android CI is fixed
// https://github.com/ggerganov/llama.cpp/pull/6780
#if defined(__x86_64__) && defined(__linux__) && defined(__TMP_DISABLED__)
#include <pthread.h>

static void cpuid(unsigned leaf, unsigned subleaf,
Expand Down Expand Up @@ -162,7 +164,9 @@ static int count_math_cpus(int cpu_count) {
* Returns number of CPUs on system that are useful for math.
*/
int get_math_cpu_count() {
#if defined(__x86_64__) && defined(__linux__)
// TODO: disabled until Android CI is fixed
// https://github.com/ggerganov/llama.cpp/pull/6780
#if defined(__x86_64__) && defined(__linux__) && defined(__TMP_DISABLED__)
int cpu_count = sysconf(_SC_NPROCESSORS_ONLN);
if (cpu_count < 1) {
return get_num_physical_cores();
Expand Down

0 comments on commit 0a86385

Please sign in to comment.