LM/llama.cpp for SYCL: Difference between revisions
< LM
Jump to navigation
Jump to search
(→Build) |
|||
| Line 17: | Line 17: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# | # set options | ||
cmake -B build-sycl \ | cmake -B build-sycl \ | ||
-DGGML_SYCL=ON \ | |||
-DGGML_SYCL_TARGET=INTEL \ | |||
-DGGML_SYCL_DNN=ON \ | |||
-DGGML_SYCL_F16=ON \ | |||
-DMKL_DIR=/opt/intel/oneapi/mkl/latest/lib/cmake/mkl \ | |||
-DCMAKE_C_COMPILER=icx \ | -DCMAKE_C_COMPILER=icx \ | ||
-DCMAKE_CXX_COMPILER=icpx \ | -DCMAKE_CXX_COMPILER=icpx \ | ||
- | -DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_RPATH="\$ORIGIN/../lib" | -DCMAKE_INSTALL_RPATH="\$ORIGIN/../lib" | ||
# build | |||
cmake -B build-sycl --config Release | cmake -B build-sycl --config Release | ||
Revision as of 15:36, 13 August 2026
Download source
sudo apt install git cmake
sudo apt install libssl-dev openssl
mkdir -p ~/llama.cpp/src
git clone https://github.com/ggerganov/llama.cpp ~/llama.cpp/src
List available options
grep -rn "option(GGML_SYCL" CMakeLists.txt ggml/CMakeLists.txt
Build
# set options
cmake -B build-sycl \
-DGGML_SYCL=ON \
-DGGML_SYCL_TARGET=INTEL \
-DGGML_SYCL_DNN=ON \
-DGGML_SYCL_F16=ON \
-DMKL_DIR=/opt/intel/oneapi/mkl/latest/lib/cmake/mkl \
-DCMAKE_C_COMPILER=icx \
-DCMAKE_CXX_COMPILER=icpx \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_RPATH="\$ORIGIN/../lib"
# build
cmake -B build-sycl --config Release
# Install
cmake --install build-sycl --prefix ~/llama.cpp/sycl
# clean
cmake -B build-sycl --target clean
# test GPU
cd ~/llama.cpp/sycl/bin
./llama-cli --list-devices
Got It!
Available devices: SYCL0: Intel(R) Arc(TM) Pro B70 Graphics (32656 MiB, 32128 MiB free)
References
https://sergiiob.dev/posts/intel-arc-pro-b70-full-recipe-llama-cpp-sycl/