cmake: add Intel Arc GPU support via SYCL backend

- Add sycl to the backend link loop so ggml-sycl links when built statically
- Add -fsycl link option for consumer executables (ggml-sycl links the
  SYCL runtime PRIVATE, so consumers need it on their own link line)
- Gate _FORTIFY_SOURCE=2 with NOT GGML_SYCL: the fortified __memcpy_chk
  symbol is unresolvable in SPIR-V device code and aborts kernel compilation
- Add buildsycl.sh convenience script (icx/icpx compilers)

Tested on Intel Arc A310 (DG2) with oneAPI 2026.0 + Level Zero: full TTS
generation produces correct audio output on the GPU.
This commit is contained in:
smashingtags
2026-05-19 16:15:49 -04:00
parent 55b7234d21
commit 8608504a5e
2 changed files with 18 additions and 3 deletions
Executable
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
rm -rf build
mkdir build
cd build
cmake .. -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx
cmake --build . --config Release -j "$(nproc)"