[Engine] sycl/inkling2: build_inkling_sycl.sh does not link — the quant dispatch layer is missing from its object list

Aperta Adatta ai principianti
#7,284 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 5 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cpp, linux
Ambito
build-system

Direzione di ricerca

Leggi engine/src/inkling2/sycl/build_inkling_sycl.sh e confronta il suo elenco di oggetti quant con i sorgenti identificati nell’issue e con la compilazione funzionante del core in engine/src/inkling2/CMakeLists.txt. Il rapporto segnala che mancano dispatch.cpp e i sorgenti quant specifici per ISA; verifica prima come lo script applica i flag del compilatore per ogni ISA. Il lavoro è completato quando lo script effettua correttamente il linking e stampa Build succeeded..

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Area

[Engine] (speed, kernels, models, the server and API)

Desktop app, Terminal or source?

Source (START-HERE.bat, setup.sh or a build)

What happened

engine/src/inkling2/sycl/build_inkling_sycl.sh does not link. Every object compiles, then the link fails on the quant
dispatch symbols that inkling2_loop.cpp calls, and no strata-inkling-sycl binary is produced:

/usr/bin/ld: inkling2_loop.cpp:(.text+0x6b3b): undefined reference to `strata::quant::default_arith()'
/usr/bin/ld: inkling2_loop.cpp:(.text+0x6b58): undefined reference to `strata::quant::dot_kernel(strata::quant::Type, strata::quant::Arith)'
/usr/bin/ld: inkling2_loop.cpp:(.text+0x6b6f): undefined reference to `strata::quant::dot_x4_kernel(strata::quant::Type, strata::quant::Arith)'
/usr/bin/ld: inkling2_loop.cpp:(.text+0x6bc5): undefined reference to `strata::quant::act_kernel(strata::quant::Type, strata::quant::Arith)'
icpx: error: linker command failed with exit code 1 (use -v to see invocation)

Expected: the script prints Build succeeded. and strata-inkling --version.

The script's object list takes src/quant/{sk_codecs,dequant,types}.cpp. The four symbols above are defined in
src/quant/dispatch.cpp (dot_kernel, dot_x4_kernel, act_kernel, default_arith) and provided per ISA by
src/quant/x86/{dot,act}_avx*.cpp, none of which the script compiles. The sources are therefore complete — this is only
the script's list being short. engine/src/inkling2/CMakeLists.txt builds the same core through CMake and links fine.

Smallest steps or command that reproduce it
git clone --branch v0.2.21 https://github.com/Niko1221/Strata.git && cd Strata
export PATH=/opt/intel/oneapi/compiler/latest/bin:$PATH
export LD_LIBRARY_PATH=/opt/intel/oneapi/compiler/latest/lib:/opt/intel/oneapi/mkl/latest/lib:/opt/intel/oneapi/tbb/latest/lib:/opt/intel/oneapi/umf/latest/lib
bash engine/src/inkling2/sycl/build_inkling_sycl.sh "$PWD/build-inkling-sycl" bmg

fat fails the same way; the target mode makes no difference.

Reproduction status
  • Reproduced locally
Strata version

Strata 0.2.21 · engine 0.1.67 (v0.2.21 = d46f5f268f8ed797e83a5c63a69bffbd7a581cf6)

Graphics card, memory and system

Intel Arc Pro B70 32 GB · 30 GiB RAM · Ubuntu 24.04.5, kernel 7.0.0-43-generic · oneAPI 2026.2.0 (icpx/icx)

Model, size and settings

Not reached — this is the build step, before any model is loaded.

Logs

First failure and the last lines of the same run, unedited apart from the paths:

[build_inkling_sycl] ICPX=icpx TARGET_MODE=bmg OUT_DIR=…/build-inkling-sycl
…
/usr/bin/ld: inkling2_loop.cpp:(.text+0x6b3b): undefined reference to `strata::quant::default_arith()'
icpx: error: linker command failed with exit code 1 (use -v to see invocation)
What I did after that (a workaround, in case it helps)

I added the missing translation units to a copy of the script — src/quant/{dispatch,isa,act_ref,dot_generic}.cpp with the
common flags, and src/quant/x86/{dot,act}_avx.cpp, …_avx2.cpp, …_avx512.cpp, each with its own tier flags
(dot_avx.cpp #errors if it is given AVX2/FMA/F16C, so that one gets -mavx only). With those it links and runs:

strata-inkling 0.1.67
[ink_sycl] native lossless GGUF_RAW SG16+XMX kernels active for 3072/3072 experts (zero S_K transcode)
[ink_sycl] loaded …/Inkling-2-Mini-IQ4_NL.gguf (src=gguf, build=GGUF-IQ4_NL, dev=Intel(R) Arc(TM) Pro B70 Graphics 31.9 GiB) in 20.30s

So the engine itself is fine on this card; only this script's object list is missing the quant layer. I have not sent a
pull request — if you would rather fix it in engine/src/inkling2/sycl/CMakeLists.txt (which is what packaging builds), I
can send the one-line change instead.

Lingua principale
C++
Stelle
11.6k
Fork
1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Niko1221/Strata

Tutte le issue di Niko1221/Strata

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.