Skip to content

Commit d4f4bfc

Browse files
committed
Enhance optimization flags for Hexagon backend to improve performance and enable link-time optimization
1 parent 31bde88 commit d4f4bfc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Android")
1414
#set(OPT_FLAG " -O3 -march=armv8.7-a -mcpu=cortex-x1 -mtune=cortex-x1 -ffp-model=fast -fno-finite-math-only")
1515

1616
# this set of flag is more general (without the cortex cpu optimisation, which is only available on very very modern archs)
17-
set(OPT_FLAG " -O3 -ffp-model=fast -fno-finite-math-only")
17+
set(OPT_FLAG " -O3 -flto -D_GNU_SOURCE -fvectorize -ffp-model=fast -fno-finite-math-only")
1818

1919
message("OPT_FLAG:${OPT_FLAG}")
2020
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DGGML_USE_HEXAGON ${DEBUG_FLAG} ${OPT_FLAG}")

0 commit comments

Comments
 (0)