Conversation
phymbert
previously approved these changes
Apr 20, 2024
8eb6540 to
0a86385
Compare
Collaborator
|
@ggerganov What about simply skipping
patch exampleIndex: common/common.cpp
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/common/common.cpp b/common/common.cpp
--- a/common/common.cpp (revision 0e4802b2ecbaab04b4f829fde4a3096ca19c84b5)
+++ b/common/common.cpp (date 1713342380677)
@@ -109,6 +109,7 @@
}
#if defined(__x86_64__) && defined(__linux__)
+#ifndef __ANDROID__
#include <pthread.h>
static void cpuid(unsigned leaf, unsigned subleaf,
@@ -156,6 +157,7 @@
return result;
}
+#endif // __ANDROID__
#endif // __x86_64__ && __linux__
/**
@@ -163,6 +165,7 @@
*/
int get_math_cpu_count() {
#if defined(__x86_64__) && defined(__linux__)
+#ifndef __ANDROID__
int cpu_count = sysconf(_SC_NPROCESSORS_ONLN);
if (cpu_count < 1) {
return get_num_physical_cores();
@@ -177,7 +180,8 @@
}
}
}
-#endif
+#endif // __ANDROID__
+#endif // __x86_64__ && __linux__
return get_num_physical_cores();
}
Index: examples/llama.android/README.md
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/examples/llama.android/README.md b/examples/llama.android/README.md
--- a/examples/llama.android/README.md (revision 0e4802b2ecbaab04b4f829fde4a3096ca19c84b5)
+++ b/examples/llama.android/README.md (date 1713605825665)
@@ -1,0 +1,3 @@
+# llama.cpp/examples/llama.android
+
+Demonstration of simple android app example.Works for me locally. BTW I will have a look to the android example. It does not work. |
Member
Author
|
Thanks. I keep forgetting that the Android CI pulls from diff --git a/common/common.cpp b/common/common.cpp
index b6143e41..3039e470 100644
--- a/common/common.cpp
+++ b/common/common.cpp
@@ -108,7 +108,7 @@ 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__) && !defined(__ANDROID__)
+#if defined(__x86_64__) && defined(__gnu_linux__)
#include <pthread.h>
static void cpuid(unsigned leaf, unsigned subleaf,
@@ -162,7 +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() {
-#if defined(__x86_64__) && defined(__linux__) && !defined(__ANDROID__)
+#if defined(__x86_64__) && defined(__gnu_linux__)
int cpu_count = sysconf(_SC_NPROCESSORS_ONLN);
if (cpu_count < 1) {
return get_num_physical_cores();For now, will merge as it is to make the CI green and can improve in the future |
Collaborator
|
Noted, I will fix that also. At the moment it is impossible to load a model anyway. I will have fun with that :) |
Collaborator
|
Yes it is fixed, thanks: |
Seunghhon
pushed a commit
to Seunghhon/llama.cpp
that referenced
this pull request
Apr 26, 2026
* common : disable get_math_cpu_count() until Android CI gets fixed * common : another try
phuongncn
pushed a commit
to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4
that referenced
this pull request
Apr 28, 2026
* common : disable get_math_cpu_count() until Android CI gets fixed * common : another try
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ref #6414
https://github.com/ggerganov/llama.cpp/actions/runs/8757099433/job/24035025415#step:5:200