Repository navigation
|
My CPU has the following features avx512f avx512dq avx512cd avx512bw avx512vl. But I get the following message (AVX512 = 0). Are my AVX512 features not enough? Why aren't AVX512 used? |
Replies: 1 comment 1 reply
|
The precompiled/release koboldcpp binaries are built as "portable" builds, and portable builds are capped at AVX2 by design, they never emit AVX512 code even if your CPU supports it. Look at the Makefile (concedo branch): Lines 171 to 192 in 4959b8d ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686 amd64))
ifdef LLAMA_PORTABLE
...
FULLCFLAGS += -mavx2 -msse3 -mssse3 -mfma -mf16c -mavx
SIMPLECFLAGS += -mavx -msse3 -mssse3
...
else
CFLAGS += -march=native -mtune=native
SIMPLECFLAGS += -march=native -mtune=native
SIMPLERCFLAGS += -march=native -mtune=native
FULLCFLAGS += -march=native -mtune=native
endif # LLAMA_PORTABLE
endif # if x86When And the official release binaries are all built with
The AVX512 = 0 you see at startup comes straight from this: So this isn't a detection bug, it's a build-time limitation: the shipped binary simply wasn't compiled to use AVX512, no matter what your CPU supports. If you want AVX512, you'd need to build from source yourself without setting |
The precompiled/release koboldcpp binaries are built as "portable" builds, and portable builds are capped at AVX2 by design, they never emit AVX512 code even if your CPU supports it.
Look at the Makefile (concedo branch):
koboldcpp/Makefile
Lines 171 to 192 in 4959b8d