この記事を作った動機
Intel Arc A770 LE を使っているが、NVIDIA の RTX や H100 などと異なり、標準でのサポートが薄い。そのため、フルで性能を引き出したい場合は、自分で LLM なら llama.cpp などを OneAPI を使ってコンパイルする必要がある。
LLM に関しては、当初は Intel Arc の環境において LM Studio を利用していたが、Vulkan でしか少なくとも現状では動作させることができなかった。Ollama についても試したが、どう頑張っても Apple の メタルプラットフォーム向けにしかコンパイルが動作せず、どうしよもない感じであった。そこでそれらのバックエンドである、llama.cpp を直接コンパイルして動かすことが考えられ、フロントは別に LibreChat を独立して用意する事が考えられた。
標準でも Vulkan の互換モードで動作し、使えないということはないが、多少性能が失われる。ただ、SYCL など向けに、Intel Arc を最大限使えるようにしようとすると、自分でコンパイルする必要がある。専用に用意しなければ現状では llama.cpp などは CPU しか利用できないとして Intel Arc をそもそも認識しないという挙動になった。またコンパイル自体や、コンパイル後のバイナリの扱いについて、特別な扱いが必要である。
Intel が公式で llama.cpp などのバイナリを配布していたりするが、バージョンが古く新しいモデルが動かないなど、弊害が生じる場合があった。
これらのことから、Intel Arc 向けに今回は、llama.cpp を SYCL を使えるようにコンパイルすることにした。また、PKGBUILD も作成し、手動で手順を踏まなくても、ある程度自動で Arch Linux や同じ系列の OS を使っていれば、環境が整うように工夫した。
Gemini Fast 3 を作業補助として使い、動くか確認しながら作業をした。ただそれだけだと、情報が十分まとまっておらず、環境を再構築する必要が生じたときなどに困難が想像されたため、記録を残して現状を整理したい。
なお、特にコンパイルや SYCL 周りの環境変数などは、LLM が吐き出したものをそのまま使っているだけの部分が多く色々間違っていたりする可能性がある。あくまで私の環境でやってみて動くかというのを基準にして書いている。
llama.cpp をコンパイル
OneAPI を導入する
yay -Sy intel-oneapi-toolkit level-zero-headers intel-compute-runtime level-zero-loader onetbb
# sudo pacman -Sy intel-oneapi-toolkit level-zero-headers intel-compute-runtime level-zero-loader onetbb
llama.cppのリポジトリをクローン
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
コンパイル
# OneAPI を読み込む
source /opt/intel/oneapi/setvars.sh
export CFLAGS="-fno-stack-protector -U_FORTIFY_SOURCE"
export CXXFLAGS="-fno-stack-protector -U_FORTIFY_SOURCE"
# コンパイル
cmake -B build -S llama.cpp -G Ninja \
-DGGML_SYCL=ON \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_C_COMPILER=icx \
-DCMAKE_CXX_COMPILER=icpx \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
SYCL を有効にした状態で llama.cpp を起動する
# オプションの調整用環境変数
export ZE_MAX_UNUSED_DEVICE_ALLOCATIONS_SIZE=1
export SYCL_PI_LEVEL_ZERO_DEVICE_RESERVE_MEMORY=0
export SYCL_PI_LEVEL_ZERO_DEVICE_SCOPE_EVENTS=0
export SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1
export SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1
export L0_SCS_MAX_MEM_ALLOC_SIZE=16106127360
export SYCL_PI_LEVEL_ZERO_USM_RESIDENT=0
# oneAPIの環境を読み込む
source /opt/intel/oneapi/setvars.sh
# llama.cpp に関連する設定について
MODEL_PATH="/modelPath/lmstudio/lmstudio-community/gpt-oss-20b-GGUF/gpt-oss-20b-MXFP4.gguf"
PORT=8080
HOST=0.0.0.0
GPU_LAYERS=999
ADDITIONAL_ARGS="--ctx-size 4096 --parallel 2"
# 画像などを添付する場合は、モデルファイルに付属している mmprojファイルもセットで指定する必要がある。
# ADDITIONAL_ARGS="--ctx-size 4096 --parallel 2 --mmproj ファイルパス.gguf"
# dnnl のパスを通す
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/oneapi/dnnl/latest/lib
# サーバー起動
exec /usr/bin/llama-server \
-m "$MODEL_PATH" \
--port "$PORT" \
--host "$HOST" \
-ngl "$GPU_LAYERS" \
$ADDITIONAL_ARGS
llama.cpp の PKGBUILD について
使い方
すでに作業ディレクトリを作成し、配置するファイルの事項に従って必要なファイルを配置していることを前提とする。
# インストール
makepkg -si
# 事前に用意したモデルパスを指定するなど、動作に必要な設定を行う 以下は neovim の例である
sudo nvim /etc/llama.cpp/config.conf
# サービスの有効化
sudo systemctl enable --now llama-cpp
配置するファイル
以下は、Gemini Fast 3を使って要件を与えて生成させた上で更に調整をかけたものである。基本的に不完全なので環境に合わせてさらなる調整が必要だと思われる。以下はすべて作業ディレクトリに配置する。
PKGBUILD
pkgname=llama-cpp-sycl-git
pkgver=r8833.45cac7ca70
pkgrel=1
pkgdesc="LLM inference with Intel GPU (SYCL). Includes systemd service and config."
arch=('x86_64')
url="https://github.com/ggerganov/llama.cpp"
license=('MIT')
depends=('intel-oneapi-toolkit level-zero-headers intel-compute-runtime level-zero-loader onetbb')
makedepends=('git' 'cmake' 'ninja')
options=('!strip' '!debug')
provides=('llama-cpp')
conflicts=('llama-cpp')
source=('git+https://github.com/ggerganov/llama.cpp.git'
'config.conf'
'llama-server-launcher'
'llama-cpp.service')
sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP')
pkgver() {
cd llama.cpp
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
source /opt/intel/oneapi/setvars.sh
export CFLAGS="-fno-stack-protector -U_FORTIFY_SOURCE"
export CXXFLAGS="-fno-stack-protector -U_FORTIFY_SOURCE"
export CFLAGS="-O3 -march=native -DNDEBUG"
export CXXFLAGS="-O3 -march=native -DNDEBUG"
cmake -B build -S llama.cpp -G Ninja \
-DGGML_SYCL=ON \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_C_COMPILER=icx \
-DCMAKE_CXX_COMPILER=icpx \
-DCMAKE_BUILD_TYPE=Release \
-DSYCL_INCLUDE_DIR="/opt/intel/oneapi/compiler/latest/lib" \
-DSYCL_LIBRARY_DIR="/opt/intel/oneapi/compiler/latest/include" \
-DGGML_SYCL_F16=ON \
-DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
}
package() {
# 1. バイナリ・ライブラリのインストール(前述と同じ)
DESTDIR="$pkgdir" cmake --install build
install -d "$pkgdir/usr/lib"
find build/bin -name "*.so*" -exec cp -d {} "$pkgdir/usr/lib/" \;
install -d "$pkgdir/usr/bin"
find build/bin -executable -type f -not -name "*.so*" -exec install -m755 {} "$pkgdir/usr/bin/" \;
# 2. ユーザー名の動的取得
# PKGBUILDを実行している現在のユーザー名を取得
local _real_user=${SUDO_USER:-$(whoami)}
# 3. systemdサービスファイルの加工とインストール
# %%USER%% を実際のユーザー名に置換して一時ファイルを作成し、それをインストール
sed "s/%%USER%%/$_real_user/g" "$srcdir/llama-cpp.service" > "$srcdir/llama-cpp.service.tmp"
install -Dm644 "$srcdir/llama-cpp.service.tmp" "$pkgdir/usr/lib/systemd/system/llama-cpp.service"
# 4. その他のファイルのインストール
install -Dm644 "$srcdir/config.conf" "$pkgdir/etc/llama.cpp/config.conf"
install -m755 "$srcdir/llama-server-launcher" "$pkgdir/usr/bin/llama-server-launcher"
install -Dm644 llama.cpp/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
config.conf
# /etc/llama.cpp/config.conf
# モデルのフルパス
MODEL_PATH="ReplaceThisYourLocalModelFileToUse"
# 待ち受け設定
PORT=8080
HOST=0.0.0.0
# GPU設定 (-ngl は VRAM 16GB に合わせて全レイヤー投入)
GPU_LAYERS=999
# 追加オプション (必要に応じて)
ADDITIONAL_ARGS="--ctx-size 4096 --parallel 2"
llama-cpp.service
[Unit]
Description=Llama.cpp Server with Intel Arc SYCL
After=network.target
[Service]
Environment=ZE_MAX_UNUSED_DEVICE_ALLOCATIONS_SIZE=1
Environment=SYCL_PI_LEVEL_ZERO_DEVICE_RESERVE_MEMORY=0
Environment=SYCL_PI_LEVEL_ZERO_DEVICE_SCOPE_EVENTS=0
Environment=SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1
Environment=SYCL_PI_LEVEL_ZERO_TRACK_INDIRECT_ACCESS_MEMORY=1
Environment=L0_SCS_MAX_MEM_ALLOC_SIZE=16106127360
Environment=SYCL_PI_LEVEL_ZERO_USM_RESIDENT=0
LimitMEMLOCK=infinity
LimitSTACK=infinity
Type=simple
User=%%USER%%
Group=render
SupplementaryGroups=video
ExecStart=/usr/bin/llama-server-launcher
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
llama-server-launcher
#!/bin/bash
# /usr/bin/llama-server-launcher
# OneAPI のランタイム読み込み
source /opt/intel/oneapi/setvars.sh
source /etc/llama.cpp/config.conf
# dnnl 関連の動的ライブラリについて
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/oneapi/dnnl/latest/lib
# サーバー起動
exec /usr/bin/llama-server \
-m "$MODEL_PATH" \
--port "$PORT" \
--host "$HOST" \
-ngl "$GPU_LAYERS" \
$ADDITIONAL_ARGS
その他記録
llama.cpp オプション
- 特定IPアドレスや、ポートで動かす
llama-server --host [IPアドレスやドメイン名] --port [ポート番号]
- コンテキスト長指定
llama-server --ctx-size 70000
- モデル指定
llama-server -m [モデルまでの絶対パス]
- モデルGPU オフロードの程度指定
llama-server -ngl 999
- 画像を認識できるモデル付属の追加モデルを指定
llama-server --mmproj [mmprojモデルまでの絶対パス] --embeddings
SYCL デバイスの存在確認
sycl-lsとllama-cliコマンドを使った方法を紹介する。llama-cliを使った方法については、level-zero-headersパッケージを入れた状態で、llama.cpp をコンパイルしないと正常動作しないので注意する。
source /opt/intel/oneapi/setvars.sh
# :: initializing oneAPI environment ...
# -bash: BASH_VERSION = 5.3.15(1)-release
# args: Using "$@" for setvars.sh arguments:
# :: ccl -- latest
# :: compiler -- latest
# :: debugger -- latest
# :: dev-utilities -- latest
# :: dnnl -- latest
# :: dpl -- latest
# :: ipp -- latest
# :: ippcp -- latest
# :: mkl -- latest
# :: mpi -- latest
# :: tbb -- latest
# :: tcm -- latest
# :: umf -- latest
# :: vtune -- latest
# :: oneAPI environment initialized ::
sycl-ls
# [level_zero:gpu][level_zero:0] Intel(R) oneAPI Unified Runtime over Level-Zero, Intel(R) Arc(TM) A770 Graphics 12.55.8 [1.17.39395]
# [level_zero:gpu][level_zero:1] Intel(R) oneAPI Unified Runtime over Level-Zero, Intel(R) Arc(TM) A770 Graphics 12.55.8 [1.17.39395]
# [opencl:cpu][opencl:0] Intel(R) OpenCL, Intel(R) Xeon(R) CPU E5-2667 v4 @ 3.20GHz OpenCL 3.0 (Build 0) [2026.21.3.0.31_160000]
# [opencl:gpu][opencl:1] Intel(R) OpenCL Graphics, Intel(R) Arc(TM) A770 Graphics OpenCL 3.0 NEO [26.31.39395]
# [opencl:gpu][opencl:2] Intel(R) OpenCL Graphics, Intel(R) Arc(TM) A770 Graphics OpenCL 3.0 NEO [26.31.39395]
llama-cli --list-devices
# Available devices:
# SYCL0: Intel(R) Arc(TM) A770 Graphics (16288 MiB, 16288 MiB free)
# SYCL1: Intel(R) Arc(TM) A770 Graphics (16288 MiB, 16288 MiB free)
追記
2026/9/6
問題の説明
llama.cpp 環境を構築してから、OneAPI や llama.cpp において最適化が進んでいると考えられ、アップグレードを試みた。そのところ、failed to get device memory size となり llama.cpp が起動しないという状況になった。
私の環境の場合、--cpu-moeと--fit offを llama.cpp の起動オプションに指定していたことが良くなかったようである。以下のサイトに示されることと同じ問題だとは思うが、私の環境の場合、Intel Arc A770 LE の2枚構成であり、dGPU であって、iGPU ではない。このことから考えられることは、--cpu-moeと--fit off オプションは、iGPU を使うときと同じメインメモリの管理に関する症状にぶつかっているのではないかということであった。私の場合、そのオプションはとりあえずつけていただけで明確に効果は体感できなかったため、単に外すことで問題が解決した。
- Eval bug: SYCL backend aborts at model load on Lunar Lake iGPU (Arc 140V) — device memory query fails with both Level Zero and SYCL APIs · Issue #28134 · ggml-org/llama.cpp
https://github.com/ggml-org/llama.cpp/issues/28134 (2026年9月6日)
対処
llama.cpp の起動オプションから--cpu-moeと--fit offを外す。また、llama.cpp コンパイル時に、以下のパッケージがあったほうがいいことがわかった。
yay -S level-zero-headers
# sudo pacman -S level-zero-headers
- Arch Linux - level-zero-headers 1.32.0-1 (x86_64)
https://archlinux.org/packages/extra/x86_64/level-zero-headers/ (2026年9月6日)
問題発生時のログ
llama-server のログ
# Sep 06 04:41:55 HostName llama-server-launcher[396455]: ⚠ warning: File "/opt/intel/oneapi/compiler/2026.0/lib/libsycl.so.9.0.0-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
# Sep 06 04:41:55 HostName llama-server-launcher[396455]: To enable execution of this file add
# Sep 06 04:41:55 HostName llama-server-launcher[396455]: add-auto-load-safe-path /opt/intel/oneapi/compiler/2026.0/lib/libsycl.so.9.0.0-gdb.py
# Sep 06 04:41:55 HostName llama-server-launcher[396455]: line to your configuration file "/root/.config/gdb/gdbinit".
# Sep 06 04:41:55 HostName llama-server-launcher[396455]: To completely disable this security protection add
# Sep 06 04:41:55 HostName llama-server-launcher[396455]: set auto-load safe-path /
# Sep 06 04:41:55 HostName llama-server-launcher[396455]: line to your configuration file "/root/.config/gdb/gdbinit".
# Sep 06 04:41:55 HostName llama-server-launcher[396455]: For more information about this security protection see the
# Sep 06 04:41:55 HostName llama-server-launcher[396455]: "Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
# Sep 06 04:41:55 HostName llama-server-launcher[396455]: info "(gdb)Auto-loading safe path"
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: [Thread debugging using libthread_db enabled]
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: Using host libthread_db library "/usr/lib/libthread_db.so.1".
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: 0x0000148a924a07f2 in ?? () from /usr/lib/libc.so.6
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: #0 0x0000148a924a07f2 in ?? () from /usr/lib/libc.so.6
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: #1 0x0000148a9249481c in ?? () from /usr/lib/libc.so.6
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: #2 0x0000148a92494864 in ?? () from /usr/lib/libc.so.6
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: #3 0x0000148a92504fcf in wait4 () from /usr/lib/libc.so.6
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: #4 0x0000148a92b26c2a in ggml_print_backtrace () from /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml-base.so.0
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: #5 0x0000148a92b25d89 in ggml_abort () from /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml-base.so.0
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: #6 0x0000148a8b89d3a6 in ggml_backend_sycl_device_get_memory(ggml_backend_device*, unsigned long*, unsigned long*) () from /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml-sycl.so.0
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: #7 0x0000148a8b89d4c7 in ggml_backend_sycl_device_get_props(ggml_backend_device*, ggml_backend_dev_props*) () from /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml-sycl.so.0
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: #8 0x0000148a91aa5768 in llama_model_load_from_file_impl(gguf_context*, void (*)(ggml_tensor*, void*), void*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__c>
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: #9 0x0000148a91aa68dc in llama_model_load_from_file () from /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama.so.0
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: #10 0x0000148a91fe45b0 in common_init_result::common_init_result(common_params&, bool) () from /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-common.so.0
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: #11 0x0000148a91fe6d25 in common_init_from_params(common_params&, bool) () from /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-common.so.0
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: #12 0x0000148a92d35027 in server_context_impl::load_model(common_params&) () from /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-server-impl.so
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: #13 0x0000148a92c97a70 in llama_server(common_params&, int, char**) () from /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-server-impl.so
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: #14 0x0000148a92c890ff in llama_server(int, char**) () from /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-server-impl.so
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: #15 0x0000148a92427781 in ?? () from /usr/lib/libc.so.6
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: #16 0x0000148a924278b9 in __libc_start_main () from /usr/lib/libc.so.6
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: #17 0x00000000004024e5 in _start ()
# Sep 06 04:41:56 HostName llama-server-launcher[396455]: [Inferior 1 (process 395904) detached]
# Sep 06 04:41:56 HostName systemd-coredump[396530]: Process 395904 (llama-server) of user 0 terminated abnormally with signal 6/ABRT, processing...
# Sep 06 04:41:56 HostName systemd[1]: Started Process Core Dump (PID 396530/UID 0).
# Sep 06 04:41:56 HostName systemd[1]: Started Pass systemd-coredump journal entries to relevant user for potential DrKonqi handling.
# Sep 06 04:41:56 HostName systemd-coredump[396531]: Removed old coredump core.llama-server.0.bd6f7a4429224d2798cf20cef2698b59.238728.1787688392000000.zst.
# Sep 06 04:41:56 HostName drkonqi-coredump-processor[396532]: Entry doesn't look like a dump. This may have been a vaccum run. Nothing to process.
# Sep 06 04:41:59 HostName (sd-parse-elf)[396623]: Could not parse number of program headers from core file: invalid `Elf' handle
# Sep 06 04:41:59 HostName (sd-parse-elf)[396623]: Could not parse number of program headers from core file: invalid `Elf' handle
# Sep 06 04:41:59 HostName (sd-parse-elf)[396623]: Could not parse number of program headers from core file: invalid `Elf' handle
# Sep 06 04:41:59 HostName (sd-parse-elf)[396623]: Could not parse number of program headers from core file: invalid `Elf' handle
# Sep 06 04:41:59 HostName (sd-parse-elf)[396623]: Could not parse number of program headers from core file: invalid `Elf' handle
# Sep 06 04:41:59 HostName (sd-parse-elf)[396623]: Could not parse number of program headers from core file: invalid `Elf' handle
# Sep 06 04:41:59 HostName (sd-parse-elf)[396623]: Could not parse number of program headers from core file: invalid `Elf' handle
# Sep 06 04:41:59 HostName (sd-parse-elf)[396623]: Could not parse number of program headers from core file: invalid `Elf' handle
# Sep 06 04:41:59 HostName systemd-coredump[396531]: [🡕] Process 395904 (llama-server) of user 0 dumped core.
#
# Module /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml-sycl.so.0.23.0 without build-id.
# Module /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml-sycl.so.0.23.0
# Module /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml-cpu.so.0.23.0 without build-id.
# Module /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml-cpu.so.0.23.0
# Module /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama.so.0.4.0 without build-id.
# Module /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama.so.0.4.0
# Module /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-common.so.0.4.0 without build-id.
# Module /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-common.so.0.4.0
# Module /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libmtmd.so.0.4.0 without build-id.
# Module /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libmtmd.so.0.4.0
# Module /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml-base.so.0.23.0 without build-id.
# Module /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml-base.so.0.23.0
# Module /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-server-impl.so without build-id.
# Module /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-server-impl.so
# Module /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml.so.0.23.0 without build-id.
# Module /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml.so.0.23.0
# Module libcommon_clang.so.2026.21.3.0 without build-id.
# Module libintelocl.so without build-id.
# Module libOpenCL.so.1 without build-id.
# Module libur_adapter_opencl.so.0 without build-id.
# Module libur_adapter_level_zero_v2.so.0 without build-id.
# Module libur_adapter_level_zero.so.0 without build-id.
# Module libtcm.so.1 without build-id.
# Module libtbbmalloc.so.2 without build-id.
# Module libirng.so without build-id.
# Module libur_loader.so.0 without build-id.
# Module libtbb.so.12 without build-id.
# Module libmkl_core.so.3 without build-id.
# Module libmkl_tbb_thread.so.3 without build-id.
# Module libmkl_intel_ilp64.so.3 without build-id.
# Module libmkl_sycl_blas.so.6 without build-id.
# Module libsycl.so.9 without build-id.
# Module libdnnl.so.3 without build-id.
# Module libiomp5.so without build-id.
# Module libintlc.so.5 without build-id.
# Module libimf.so without build-id.
# Module libsvml.so without build-id.
# Module llama-server without build-id.
# Stack trace of thread 395904:
# #0 0x0000148a9249a01c n/a (libc.so.6 + 0x9a01c)
# #1 0x0000148a9243e5d0 raise (libc.so.6 + 0x3e5d0)
# lines 1172-1262/1360 94%
#
#
#
#
#
# Sep 06 05:19:06 HostName llama-server-launcher[431198]: 0.00.194.934 W srv llama_server: more info: https://github.com/ggml-org/llama.cpp/pull/25655
# Sep 06 05:19:06 HostName llama-server-launcher[431198]: 0.00.194.935 W srv llama_server: -----------------
# Sep 06 05:19:06 HostName llama-server-launcher[431198]: 0.00.196.237 I srv load_model: loading model '/home/UserName/net/sub/Desktop/Data/JailbreakedLLMmodel/downloaded/gemma-4-31B-it-heretic/coder3101_gemma_4_31b_it_heretic-Q4_K_M.gguf'
# Sep 06 05:19:07 HostName llama-server-launcher[431198]: /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/llama.cpp/ggml/src/ggml-sycl/ggml-sycl.cpp:6101: [ggml_backend_sycl_device_get_memory] failed to get device memory size
# Sep 06 05:19:07 HostName llama-server-launcher[431729]: /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml-base.so.0(+0x15d48) [0x153cd3a5ed48]
# Sep 06 05:19:07 HostName llama-server-launcher[431729]: /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml-base.so.0(ggml_print_backtrace+0x285) [0x153cd3a5ed25]
# Sep 06 05:19:07 HostName llama-server-launcher[431729]: /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml-base.so.0(ggml_abort+0x109) [0x153cd3a5dd89]
# Sep 06 05:19:07 HostName llama-server-launcher[431729]: /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml-sycl.so.0(+0x9d3a6) [0x153ccc09d3a6]
# Sep 06 05:19:07 HostName llama-server-launcher[431729]: /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml-sycl.so.0(+0x9d4c7) [0x153ccc09d4c7]
# Sep 06 05:19:07 HostName llama-server-launcher[431729]: /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama.so.0(+0xa5768) [0x153cd22a5768]
# Sep 06 05:19:07 HostName llama-server-launcher[431729]: /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama.so.0(llama_model_load_from_file+0xfc) [0x153cd22a68dc]
# Sep 06 05:19:07 HostName llama-server-launcher[431729]: /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-common.so.0(_ZN18common_init_resultC2ER13common_paramsb+0x590) [0x153cd27e45b0]
# Sep 06 05:19:07 HostName llama-server-launcher[431729]: /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-common.so.0(_Z23common_init_from_paramsR13common_paramsb+0x35) [0x153cd27e6d25]
# Sep 06 05:19:07 HostName llama-server-launcher[431729]: /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-server-impl.so(_ZN19server_context_impl10load_modelER13common_params+0x977) [0x153cd3535027]
# Sep 06 05:19:07 HostName llama-server-launcher[431729]: /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-server-impl.so(_Z12llama_serverR13common_paramsiPPc+0x8e90) [0x153cd3497a70]
# Sep 06 05:19:07 HostName llama-server-launcher[431729]: /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-server-impl.so(_Z12llama_serveriPPc+0x7f) [0x153cd34890ff]
# Sep 06 05:19:07 HostName llama-server-launcher[431729]: /usr/lib/libc.so.6(+0x27781) [0x153cd2c27781]
# Sep 06 05:19:07 HostName llama-server-launcher[431729]: /usr/lib/libc.so.6(__libc_start_main+0x89) [0x153cd2c278b9]
# Sep 06 05:19:07 HostName llama-server-launcher[431729]: /usr/bin/llama-server() [0x4024e5]
# Sep 06 05:19:07 HostName systemd-coredump[431730]: Process 431198 (llama-server) of user 0 terminated abnormally with signal 6
ちなみに、別に llama.cpp を完全に起動せず、SYCL デバイスをリスティングしようとしただけでも今回の問題に巻き込まれるようである。設定次第では動きはするので、issue はすでに GitHub に立っているし、修正されるまでは時間の問題な気がする。
llama-cli –list-devices が機能しない様子
llama-cli --list-devices
# Available devices:
# /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/llama.cpp/ggml/src/ggml-sycl/ggml-sycl.cpp:6101: [ggml_backend_sycl_device_get_memory] failed to get device memory size
# [New LWP 9099]
# [New LWP 9098]
# [New LWP 9097]
#
# This GDB supports auto-downloading debuginfo from the following URLs:
# <https://debuginfod.archlinux.org>
# Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal]
# Debuginfod has been disabled.
# To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
# Registering SYCL extensions for gdb
# [Thread debugging using libthread_db enabled]
# Using host libthread_db library "/usr/lib/libthread_db.so.1".
# 0x00007f9cbfea07f2 in ?? () from /usr/lib/libc.so.6
# #0 0x00007f9cbfea07f2 in ?? () from /usr/lib/libc.so.6
# #1 0x00007f9cbfe9481c in ?? () from /usr/lib/libc.so.6
# #2 0x00007f9cbfe94864 in ?? () from /usr/lib/libc.so.6
# #3 0x00007f9cbff04fcf in wait4 () from /usr/lib/libc.so.6
# #4 0x00007f9cc0048c7a in ggml_print_backtrace () from /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml-base.so.0
# #5 0x00007f9cc0047d51 in ggml_abort () from /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml-base.so.0
# #6 0x00007f9cb8c9d476 in ggml_backend_sycl_device_get_memory(ggml_backend_device*, unsigned long*, unsigned long*) () from /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libggml-sycl.so.0
# #7 0x00007f9cbf0c6253 in common_print_available_devices() () from /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-common.so.0
# #8 0x00007f9cbf0f10c6 in common_params_parser_init(common_params&, llama_example, void (*)(int, char**))::$_151::__invoke(common_params&) () from /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-common.so.0
# #9 0x00007f9cbf0e58fc in common_params_parse_ex(int, char**, common_params_context&) () from /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-common.so.0
# #10 0x00007f9cbf0e3965 in common_params_parse(int, char**, common_params&, llama_example, void (*)(int, char**)) () from /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-common.so.0
# #11 0x00007f9cc0def135 in llama_cli(int, char**) () from /home/UserName/scripts/llama.cpp/install/llama.cpp-install/ArchInstall/src/build/bin/libllama-cli-impl.so
# #12 0x00007f9cbfe27781 in ?? () from /usr/lib/libc.so.6
# #13 0x00007f9cbfe278b9 in __libc_start_main () from /usr/lib/libc.so.6
# #14 0x00000000004363d5 in _start ()
# [Inferior 1 (process 9095) detached]
# Aborted (core dumped) llama-cli --list-devices
更新のバージョン
- OneAPI
yay -Qs oneapi
# pacman -Qs oneapi
# local/intel-compute-runtime 26.31.39395.13-1
# Intel(R) Graphics Compute Runtime for oneAPI Level Zero and OpenCL(TM) Driver
# local/intel-level-zero-raytracing-support 1.2.4-1
# Intel oneAPI Raytracing Support
# local/intel-oneapi-toolkit 2026.0.1.27+c9c3d3e3_ddb4_490e_bb41_6e9041ba32a7-2
# Intel oneAPI Toolkit for Linux
# local/level-zero-headers 1.32.0-1
# API for accessing low level interfaces in oneAPI platform devices (headers)
# local/level-zero-loader 1.32.0-1
# API for accessing low level interfaces in oneAPI platform devices (loader)
# local/onetbb 2023.1.0-1
# oneAPI Threading Building Blocks - a high level abstract threading library
- llama.cpp (6a1a922)
使った画像とか
- Intel Arc | Logopedia | Fandom
https://logos.fandom.com/wiki/Intel_Arc?file=Intel_Arc_Badge.png (2026年6月27日) - GitHub - ggml-org/llama.cpp: LLM inference in C/C++ · GitHub
https://github.com/ggml-org/llama.cpp (2026年6月27日)
参考にしたサイトとか
-
ggml-org/llama.cpp: LLM inference in C/C++
https://github.com/ggml-org/llama.cpp (2026年5月22日) -
llama.cpp/docs/backend/SYCL.md at master · ggml-org/llama.cpp
https://github.com/ggml-org/llama.cpp/blob/master/docs/backend/SYCL.md (2026年5月22日) -
Google Gemini
https://gemini.google.com/app (2026年5月22日) -
Ollama
https://ollama.com/ (2026年6月27日) -
LM Studio - Local AI on your computer
https://lmstudio.ai/ (2026年6月27日) -
Eval bug: SYCL backend aborts at model load on Lunar Lake iGPU (Arc 140V) — device memory query fails with both Level Zero and SYCL APIs · Issue #28134 · ggml-org/llama.cpp
https://github.com/ggml-org/llama.cpp/issues/28134 (2026年9月6日) -
Matrix-Meta/intel-oneapi-base-toolkit-2025: intel-oneapi-base-toolkit-2025 AUR package backup repository
https://github.com/Matrix-Meta/intel-oneapi-base-toolkit-2025 (2026年9月6日) -
Arch Linux - intel-oneapi-toolkit 2026.0.1.27+c9c3d3e3_ddb4_490e_bb41_6e9041ba32a7-2 (x86_64)
https://archlinux.org/packages/extra/x86_64/intel-oneapi-toolkit/ (2026年9月6日) -
Arch Linux - level-zero-headers 1.32.0-1 (x86_64)
https://archlinux.org/packages/extra/x86_64/level-zero-headers/ (2026年9月6日) -
AUR (en) - intel-deep-learning-essentials
https://aur.archlinux.org/packages/intel-deep-learning-essentials (2026年9月6日)