common : another try
This commit is contained in:
parent
0a86385703
commit
cc4efc5e4f
1 changed files with 2 additions and 6 deletions
|
@ -108,9 +108,7 @@ int32_t get_num_physical_cores() {
|
||||||
return n_threads > 0 ? (n_threads <= 4 ? n_threads : n_threads / 2) : 4;
|
return n_threads > 0 ? (n_threads <= 4 ? n_threads : n_threads / 2) : 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: disabled until Android CI is fixed
|
#if defined(__x86_64__) && defined(__linux__) && !defined(__ANDROID__)
|
||||||
// https://github.com/ggerganov/llama.cpp/pull/6780
|
|
||||||
#if defined(__x86_64__) && defined(__linux__) && defined(__TMP_DISABLED__)
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
static void cpuid(unsigned leaf, unsigned subleaf,
|
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.
|
* Returns number of CPUs on system that are useful for math.
|
||||||
*/
|
*/
|
||||||
int get_math_cpu_count() {
|
int get_math_cpu_count() {
|
||||||
// TODO: disabled until Android CI is fixed
|
#if defined(__x86_64__) && defined(__linux__) && !defined(__ANDROID__)
|
||||||
// https://github.com/ggerganov/llama.cpp/pull/6780
|
|
||||||
#if defined(__x86_64__) && defined(__linux__) && defined(__TMP_DISABLED__)
|
|
||||||
int cpu_count = sysconf(_SC_NPROCESSORS_ONLN);
|
int cpu_count = sysconf(_SC_NPROCESSORS_ONLN);
|
||||||
if (cpu_count < 1) {
|
if (cpu_count < 1) {
|
||||||
return get_num_physical_cores();
|
return get_num_physical_cores();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue