Skip to content

Commit 057dc7c

Browse files
committed
PPC MMA implementation
Signed-off-by: Amrita H S <[email protected]>
1 parent c35e586 commit 057dc7c

File tree

2 files changed

+615
-2
lines changed

2 files changed

+615
-2
lines changed

ggml/src/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,8 +1200,13 @@ elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64" OR CMAKE_GENERATOR_PLATFORM_LW
12001200
endif()
12011201
elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64")
12021202
message(STATUS "PowerPC detected")
1203-
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64le")
1204-
list(APPEND ARCH_FLAGS -mcpu=powerpc64le)
1203+
execute_process(COMMAND bash -c "grep POWER10 /proc/cpuinfo | head -n 1"
1204+
OUTPUT_VARIABLE POWER10_M)
1205+
string(FIND ${POWER10_M} "POWER10" substring_index)
1206+
if(${substring_index} GREATER_EQUAL 0)
1207+
list(APPEND ARCH_FLAGS -mcpu=power10)
1208+
elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64le")
1209+
list(APPEND ARCH_FLAGS -mcpu=powerpc64le)
12051210
else()
12061211
list(APPEND ARCH_FLAGS -mcpu=native -mtune=native)
12071212
#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)