Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common : try to fix Android CI #6780

Merged
merged 2 commits into from
Apr 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
common : another try
  • Loading branch information
ggerganov committed Apr 20, 2024
commit cc4efc5e4f36bdbe78f0cfa7536a3227946c6bff
8 changes: 2 additions & 6 deletions common/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <pthread.h>

static void cpuid(unsigned leaf, unsigned subleaf,
Expand Down Expand Up @@ -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();
Expand Down
Loading