File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -683,22 +683,14 @@ bool ggml_is_numa(void) {
683683}
684684
685685#if defined(__ARM_ARCH )
686-
687- #if defined(__linux__ ) && defined(__aarch64__ )
688- #include <sys/auxv.h>
689- #endif
690-
691- static void ggml_init_arm_arch_features (void ) {
692686#if defined(__aarch64__ ) && defined(__ARM_FEATURE_SVE )
693- #if defined(__linux__ )
694- ggml_arm_arch_features .sve_cnt = PR_SVE_VL_LEN_MASK & prctl (PR_SVE_GET_VL );
687+ #include <arm_sve.h>
688+ static void ggml_init_arm_arch_features (void ) {
689+ ggml_arm_arch_features .sve_cnt = svcntb ();
690+ }
695691#else
696- // TODO: add support of SVE for non-linux systems
697- #error "TODO: SVE is not supported on this platform. To use SVE, sve_cnt needs to be initialized here."
698- #endif
692+ static void ggml_init_arm_arch_features (void ) {}
699693#endif
700- }
701-
702694#endif // __ARM_ARCH
703695
704696struct ggml_tensor * ggml_new_i32 (struct ggml_context * ctx , int32_t value ) {
You can’t perform that action at this time.
0 commit comments