From ae41fd2e658ad6f35a0b76c9d6e6c144c4b4ebee Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Tue, 13 Aug 2024 16:59:12 +0300 Subject: [PATCH] make : force CPU extensions [no ci] --- Makefile | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 649671ed6..6fa28be02 100644 --- a/Makefile +++ b/Makefile @@ -434,19 +434,16 @@ endif ifndef RISCV -ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686 amd64)) - # Use all CPU extensions that are available: - MK_CFLAGS += -march=native -mtune=native - HOST_CXXFLAGS += -march=native -mtune=native +MK_CFLAGS += -mfma -mf16c -mavx -mavx2 +HOST_CXXFLAGS += -mfma -mf16c -mavx -mavx2 - # Usage AVX-only - #MK_CFLAGS += -mfma -mf16c -mavx - #MK_CXXFLAGS += -mfma -mf16c -mavx +# Usage AVX-only +#MK_CFLAGS += -mfma -mf16c -mavx +#MK_CXXFLAGS += -mfma -mf16c -mavx - # Usage SSSE3-only (Not is SSE3!) - #MK_CFLAGS += -mssse3 - #MK_CXXFLAGS += -mssse3 -endif +# Usage SSSE3-only (Not is SSE3!) +#MK_CFLAGS += -mssse3 +#MK_CXXFLAGS += -mssse3 ifneq '' '$(findstring mingw,$(shell $(CC) -dumpmachine))' # The stack is only 16-byte aligned on Windows, so don't let gcc emit aligned moves.