summaryrefslogtreecommitdiff
path: root/0012-fix-guard-arm-only-code-for-non-arm-builds.patch
diff options
context:
space:
mode:
Diffstat (limited to '0012-fix-guard-arm-only-code-for-non-arm-builds.patch')
-rw-r--r--0012-fix-guard-arm-only-code-for-non-arm-builds.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/0012-fix-guard-arm-only-code-for-non-arm-builds.patch b/0012-fix-guard-arm-only-code-for-non-arm-builds.patch
new file mode 100644
index 0000000..c923d6a
--- /dev/null
+++ b/0012-fix-guard-arm-only-code-for-non-arm-builds.patch
@@ -0,0 +1,30 @@
+--- a/ggml/src/ggml.c
++++ b/ggml/src/ggml.c
+@@ -76,7 +76,9 @@
+ #include <sys/prctl.h>
+ #endif
+
++#if defined(__ARM_FEATURE_SVE)
+ #include <arm_sve.h>
++#endif
+
+ #if defined(__ANDROID__)
+ #include <unwind.h>
+--- a/ggml/src/ggml-cpu/ops.cpp
++++ b/ggml/src/ggml-cpu/ops.cpp
+@@ -7206,6 +7206,7 @@
+ }
+ }
+
++#if defined(GGML_USE_FUSED_CPP_SDPA)
+ static void ggml_compute_forward_fused_cpp_sdpa_ext_impl(
+ const float * q,
+ const float * k,
+@@ -7258,6 +7259,7 @@
+ GGML_ABORT("fused_cpp fp32_packqkv sdpa failed with code %d", ret);
+ }
+ }
++#endif // GGML_USE_FUSED_CPP_SDPA
+
+ void ggml_compute_forward_fused_cpp_sdpa_ext(
+ const ggml_compute_params * params,