ggml : automatic selection of best CPU backend (#10606)

* ggml : automatic selection of best CPU backend

* amx : minor opt

* add GGML_AVX_VNNI to enable avx-vnni, fix checks
This commit is contained in:
Diego Devesa 2024-12-01 16:12:41 +01:00 committed by GitHub
parent 86dc11c5bc
commit 3420909dff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 599 additions and 156 deletions

12
scripts/build-cpu.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
name="$1"
args="${@:2}"
echo "Building $name with args: $args"
rm -fr build-cpu-$1
cmake -S . -B build-cpu-$1 -DGGML_BACKEND_DL=ON -DGGML_NATIVE=OFF $args
cmake --build build-cpu-$1 --config Release -t ggml-cpu -j $(nproc)
cp build-cpu-$1/bin/libggml-cpu.so ./libggml-cpu-$1.so
rm -fr build-cpu-$1