summaryrefslogtreecommitdiff
path: root/0012-fix-guard-arm-only-code-for-non-arm-builds.patch
blob: c923d6a331412169a59278a4506e7024e35210a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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,