Skip to content

Commit 22d3fba

Browse files
committed
PPC MMA implementation
Signed-off-by: Amrita H S <[email protected]>
1 parent 8841ce3 commit 22d3fba

File tree

2 files changed

+614
-2
lines changed

2 files changed

+614
-2
lines changed

ggml/src/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,8 +1259,13 @@ elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64" OR CMAKE_GENERATOR_PLATFORM_LW
12591259
endif()
12601260
elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64")
12611261
message(STATUS "PowerPC detected")
1262-
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64le")
1263-
list(APPEND ARCH_FLAGS -mcpu=powerpc64le)
1262+
execute_process(COMMAND bash -c "grep POWER10 /proc/cpuinfo | head -n 1"
1263+
OUTPUT_VARIABLE POWER10_M)
1264+
string(FIND ${POWER10_M} "POWER10" substring_index)
1265+
if(${substring_index} GREATER_EQUAL 0)
1266+
list(APPEND ARCH_FLAGS -mcpu=power10)
1267+
elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64le")
1268+
list(APPEND ARCH_FLAGS -mcpu=powerpc64le)
12641269
else()
12651270
list(APPEND ARCH_FLAGS -mcpu=native -mtune=native)
12661271
#TODO: Add targets for Power8/Power9 (Altivec/VSX) and Power10(MMA) and query for big endian systems (ppc64/le/be)

0 commit comments

Comments
 (0)