Remove division from matrix multiplication

This change reduces llama.com CPU cycles systemically by 2.5% according
to the Linux Kernel `perf stat -Bddd` utility.
This commit is contained in:
Justine Tunney 2023-05-10 21:19:54 -07:00
parent a88290e595
commit 1f6f9e6701
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
7 changed files with 191 additions and 70 deletions

View file

@ -58,6 +58,20 @@ $(THIRD_PARTY_GGML_A_OBJS): private \
-mfma
endif
o/rel/third_party/ggml/ggml.o \
o/opt/third_party/ggml/ggml.o: private \
OVERRIDE_CFLAGS += \
-fomit-frame-pointer \
-x-no-pg
ifeq ($(ARCH), x86_64)
o/rel/third_party/ggml/ggml.o \
o/opt/third_party/ggml/ggml.o: private \
OVERRIDE_CFLAGS += \
-fschedule-insns2 \
-mred-zone
endif
################################################################################
# command for running inference on large language models
# make -j8 o//third_party/ggml/llama.com