ggml-cpu : rework weak alias on apple targets (#14146)

* ggml-cpu : rework weak alias on apple targets

* fix powerpc detection

* fix ppc detection

* fix powerpc detection on darwin
This commit is contained in:
xctan 2025-06-16 13:54:15 +08:00 committed by GitHub
parent d7da8dc83a
commit 3555b3004b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 99 additions and 47 deletions

View file

@ -509,7 +509,7 @@ void ggml_barrier(struct ggml_threadpool * tp);
#define GGML_DO_PRAGMA_(x) _Pragma (#x)
#define GGML_DO_PRAGMA(x) GGML_DO_PRAGMA_(x)
#if defined(GGML_CPU_GENERIC) || defined(__HIPCC__)
#if defined(GGML_CPU_GENERIC) || defined(__HIPCC__) || defined(__APPLE__)
// Note for Apple targets:
// - clang: aliases are not supported on darwin
// - all native kernels need to be implemented in both x86 and arm files