diff options
author | Marvin Gießing <marvin.giessing@gmail.com> | 2023-05-02 18:42:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-02 19:42:16 +0300 |
commit | cc0bb7235c72e50a621800e366d0e4fe315f0e11 (patch) | |
tree | 33132cd77bbf5e3410aad4e0f5a54ff7a87c2b7d | |
parent | 2bb992f034689e2ddd7b9ac05163b0359a5957b3 (diff) |
ggml : fix ppc64le build error and make cmake detect Power processors (#1284)
* Fix ppc64le build issue
* Added support to detect ppc64* processors
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | ggml.c | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f6a66da..53d48a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -359,8 +359,11 @@ elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^(x86_64|i686|AMD64)$") add_compile_options(-mavx512vnni) endif() endif() +elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64") + message(STATUS "PowerPC detected") + add_compile_options(-mcpu=native -mtune=native) + #TODO: Add targets for Power8/Power9 (Altivec/VSX) and Power10(MMA) and query for big endian systems (ppc64/le/be) else() - # TODO: support PowerPC message(STATUS "Unknown architecture") endif() @@ -826,6 +826,7 @@ static void quantize_row_q4_0(const float * restrict x, void * restrict vy, int float max = 0.0f; float min = 0.0f; + vector float asrcv [8]; vector float srcv [8]; vector float maxv[8]; vector float minv[8]; |