mirror of
https://github.com/mudler/LocalAI.git
synced 2024-12-20 21:23:10 +00:00
1c57f8d077
* feat(sycl): Add sycl support (#1647) * onekit: install without prompts * set cmake args only in grpc-server Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * cleanup * fixup sycl source env * Cleanup docs * ci: runs on self-hosted * fix typo * bump llama.cpp * llama.cpp: update server * adapt to upstream changes * adapt to upstream changes * docs: add sycl --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
55 lines
1.5 KiB
Bash
Executable File
55 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
cd /build
|
|
|
|
# If we have set EXTRA_BACKENDS, then we need to prepare the backends
|
|
if [ -n "$EXTRA_BACKENDS" ]; then
|
|
echo "EXTRA_BACKENDS: $EXTRA_BACKENDS"
|
|
# Space separated list of backends
|
|
for backend in $EXTRA_BACKENDS; do
|
|
echo "Preparing backend: $backend"
|
|
make -C $backend
|
|
done
|
|
fi
|
|
|
|
if [ -e "/opt/intel/oneapi/setvars.sh" ]; then
|
|
source /opt/intel/oneapi/setvars.sh
|
|
fi
|
|
|
|
if [ "$REBUILD" != "false" ]; then
|
|
rm -rf ./local-ai
|
|
make build -j${BUILD_PARALLELISM:-1}
|
|
else
|
|
echo "@@@@@"
|
|
echo "Skipping rebuild"
|
|
echo "@@@@@"
|
|
echo "If you are experiencing issues with the pre-compiled builds, try setting REBUILD=true"
|
|
echo "If you are still experiencing issues with the build, try setting CMAKE_ARGS and disable the instructions set as needed:"
|
|
echo 'CMAKE_ARGS="-DLLAMA_F16C=OFF -DLLAMA_AVX512=OFF -DLLAMA_AVX2=OFF -DLLAMA_FMA=OFF"'
|
|
echo "see the documentation at: https://localai.io/basics/build/index.html"
|
|
echo "Note: See also https://github.com/go-skynet/LocalAI/issues/288"
|
|
echo "@@@@@"
|
|
echo "CPU info:"
|
|
grep -e "model\sname" /proc/cpuinfo | head -1
|
|
grep -e "flags" /proc/cpuinfo | head -1
|
|
if grep -q -e "\savx\s" /proc/cpuinfo ; then
|
|
echo "CPU: AVX found OK"
|
|
else
|
|
echo "CPU: no AVX found"
|
|
fi
|
|
if grep -q -e "\savx2\s" /proc/cpuinfo ; then
|
|
echo "CPU: AVX2 found OK"
|
|
else
|
|
echo "CPU: no AVX2 found"
|
|
fi
|
|
if grep -q -e "\savx512" /proc/cpuinfo ; then
|
|
echo "CPU: AVX512 found OK"
|
|
else
|
|
echo "CPU: no AVX512 found"
|
|
fi
|
|
echo "@@@@@"
|
|
fi
|
|
|
|
./local-ai "$@"
|