# build script scope).
project("llama-android")
-include(FetchContent)
-FetchContent_Declare(
- llama
- GIT_REPOSITORY https://github.com/ggerganov/llama.cpp
- GIT_TAG master
-)
+#include(FetchContent)
+#FetchContent_Declare(
+# llama
+# GIT_REPOSITORY https://github.com/ggerganov/llama.cpp
+# GIT_TAG ci-android
+#)
+#
+## Also provides "common"
+#FetchContent_MakeAvailable(llama)
-# Also provides "common"
-FetchContent_MakeAvailable(llama)
+add_subdirectory(../../../../../../ please-work)
# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
return x/(1.0f + expf(-x));
}
-#if defined(__ARM_NEON)
+#if defined(__ARM_NEON) && defined(__aarch64__)
// adapted from arm limited optimized routine
// the maximum error is 1.45358 plus 0.5 ulps
for (; i + 3 < n; i += 4) {
_mm_storeu_ps(y + i, ggml_v_silu(_mm_loadu_ps(x + i)));
}
-#elif defined(__ARM_NEON)
+#elif defined(__ARM_NEON) && defined(__aarch64__)
for (; i + 3 < n; i += 4) {
vst1q_f32(y + i, ggml_v_silu(vld1q_f32(x + i)));
}
#endif
sum += (ggml_float)_mm_cvtss_f32(val);
}
-#elif defined(__ARM_NEON)
+#elif defined(__ARM_NEON) && defined(__aarch64__)
for (; i + 3 < n; i += 4) {
float32x4_t val = ggml_v_expf(vsubq_f32(vld1q_f32(x + i),
vdupq_n_f32(max)));