Centos9 编译提示unsupported instruction `vpdpbusd'
OS:Centos9
GCC:11.4.1
CMD:make LLAMA_CUBLAS=1
ERROR INFO:
/tmp/cc1SXjxo.s: Assembler messages:
/tmp/cc1SXjxo.s:26007: 错误:unsupported instruction vpdpbusd' /tmp/cc1SXjxo.s:26068: 错误:unsupported instruction vpdpbusd'
/tmp/cc1SXjxo.s:26140: 错误:unsupported instruction vpdpbusd' /tmp/cc1SXjxo.s:26209: 错误:unsupported instruction vpdpbusd'
/tmp/cc1SXjxo.s:26268: 错误:unsupported instruction `vpdpbusd'
make: *** [Makefile:563:ggml-quants.o] 错误 1
make LLAMA_OPENBLAS=1
same error on Rocky Linux:
FAILED: vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-quants.c.o /usr/bin/cc -D_GNU_SOURCE -D_XOPEN_SOURCE=600 -I/tmp/pip-install-bg5eznf1/llama-cpp-python_579d2470839f49e8875b89d0a75fa950/vendor/llama.cpp/. -O3 -DNDEBUG -std=gnu11 -fPIC -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wshadow -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Werror=implicit-int -Werror=implicit-function-declaration -Wdouble-promotion -march=native -MD -MT vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-quants.c.o -MF vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-quants.c.o.d -o vendor/llama.cpp/CMakeFiles/ggml.dir/ggml-quants.c.o -c /tmp/pip-install-bg5eznf1/llama-cpp-python_579d2470839f49e8875b89d0a75fa950/vendor/llama.cpp/ggml-quants.c /tmp/ccjE5QAS.s: Assembler messages: /tmp/ccjE5QAS.s:25757: Error: unsupported instructionvpdpbusd'
/tmp/ccjE5QAS.s:25815: Error: unsupported instruction vpdpbusd' /tmp/ccjE5QAS.s:25888: Error: unsupported instruction vpdpbusd'
/tmp/ccjE5QAS.s:25955: Error: unsupported instruction vpdpbusd' /tmp/ccjE5QAS.s:26013: Error: unsupported instruction vpdpbusd'
`
I tried the following:
CMAKE_ARGS="-DLLAMA_OPENBLAS=1" FORCE_CMAKE=1 pip install llama-cpp-python --no-cache-dir
This seems to happen on systems with AVX as older CentOS/Rocky/EL compilers don't have the right support for modern AVX. I got by it by disabling avx in MKFLAGS -mno-avx. Try that.
ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686 amd64))
# Use all CPU extensions that are available:
MK_CFLAGS += -march=native -mtune=native -mno-avx
HOST_CXXFLAGS += -march=native -mtune=native -mno-avx
Okay to close this one? Please let me know.
This alternatively is handled by using a newer version of GCC on RHEL by enabling the Code Ready Linux Builder repos:
sudo subscription-manager repos --enable "codeready-builder-for-rhel-9-$(arch)-rpms"
sudo dnf install -y gcc-toolset-13-gcc gcc-toolset-13-gcc-c++
and running the build with:
CC="/opt/rh/gcc-toolset-13/root/usr/bin/gcc" CXX="/opt/rh/gcc-toolset-13/root/usr/bin/g++"
This seems to happen on systems with AVX as older CentOS/Rocky/EL compilers don't have the right support for modern AVX. I got by it by disabling avx in MKFLAGS
-mno-avx. Try that.ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686 amd64)) # Use all CPU extensions that are available: MK_CFLAGS += -march=native -mtune=native -mno-avx HOST_CXXFLAGS += -march=native -mtune=native -mno-avxOkay to close this one? Please let me know.
thanks !this fix this problem
I fixed with:
sudo dnf install gcc-toolset-13-gcc gcc-toolset-13-gcc-c++
source /opt/rh/gcc-toolset-13/enable
make