LM/llama.cpp for SYCL: Difference between revisions
< LM
Jump to navigation
Jump to search
(Created page with "== Download source == <syntaxhighlight lang="bash"> 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 </syntaxhighlight>") |
No edit summary |
||
| Line 1: | Line 1: | ||
== Download source == | == Download source == | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo apt install git cmake | sudo apt install git cmake | ||
| Line 6: | Line 7: | ||
git clone https://github.com/ggerganov/llama.cpp ~/llama.cpp/src | git clone https://github.com/ggerganov/llama.cpp ~/llama.cpp/src | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Build === | |||
<syntaxhighlight lang="bash"> | |||
# build | |||
cmake -B build-sycl \ | |||
-DCMAKE_C_COMPILER=icx \ | |||
-DCMAKE_CXX_COMPILER=icpx \ | |||
-DGGML_SYCL=ON \ | |||
-DMKL_DIR=/opt/intel/oneapi/mkl/latest/lib/cmake/mkl \ | |||
-DCMAKE_INSTALL_RPATH="\$ORIGIN/../lib" | |||
cmake --build build-sycl --config Release | |||
# Install | |||
cmake --install build-sycl --prefix ~/llama.cpp/sycl | |||
# clean | |||
cmake --build build-sycl --target clean | |||
# test GPU | |||
cd ~/llama.cpp/openvino/bin | |||
./llama-cli --list-devices | |||
</syntaxhighlight> | |||
Got It! | |||
<pre> | |||
Available devices: | |||
SYCL0: Intel(R) Arc(TM) Pro B70 Graphics (32656 MiB, 32128 MiB free) | |||
</pre> | |||
Revision as of 15:14, 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
Build
# build
cmake -B build-sycl \
-DCMAKE_C_COMPILER=icx \
-DCMAKE_CXX_COMPILER=icpx \
-DGGML_SYCL=ON \
-DMKL_DIR=/opt/intel/oneapi/mkl/latest/lib/cmake/mkl \
-DCMAKE_INSTALL_RPATH="\$ORIGIN/../lib"
cmake --build build-sycl --config Release
# Install
cmake --install build-sycl --prefix ~/llama.cpp/sycl
# clean
cmake --build build-sycl --target clean
# test GPU
cd ~/llama.cpp/openvino/bin
./llama-cli --list-devices
Got It!
Available devices: SYCL0: Intel(R) Arc(TM) Pro B70 Graphics (32656 MiB, 32128 MiB free)