koboldcpp/docs
David Spruill e9fb3b3fc0
sycl : support --split-mode tensor (#24152)
* Sycl tp stage1 (#1)

* SYCL: tensor parallelism (--split-mode tensor) for dual-GPU

Adds the comm_init/comm_free/comm_allreduce_tensor trio that the
meta-backend queries via get_proc_address to enable backend-specific
all-reduce, mirroring the pattern used by ggml-cuda.cu.

For N=2 (the common dual-GPU case) implements a degenerate ring
all-reduce with two size-branched paths:

  * Small (nelem < 32768): FP32 direct memcpy + per-device ADD kernel
    chained via depends_on(memcpy_event). 4 SYCL submissions/call.

  * Large (nelem >= 32768): BF16-compressed. Each device compresses
    FP32 -> BF16 in a local outbox, cross-device memcpys to the peer's
    inbox (HALF the PCIe bytes), then decompresses + adds into the
    local FP32 partial. 6 SYCL submissions/call but PCIe bytes halved
    -- wins for any tensor where PCIe dominates kernel time.

Threshold and BF16 path pattern mirror the CUDA NCCL allreduce.

Storage: ONE persistent uint8_t buffer per device, 4 * nelem bytes
(matches both path layouts: FP32 nelem floats; BF16 outbox+inbox =
2 * nelem uint16_t each). Single alloc+free per device keeps the
SYCL pool's strict-LIFO invariant trivial.

Initial impl handles N=2 FP32 contiguous tensors. Other cases return
false, causing the meta-backend to use its generic butterfly fallback.

Per-call sync is intentionally omitted. SYCL in-order queue semantics
ensure that the meta-backend's next compute on the same per-device
queue waits for our final ADD, and the next allreduce's first op on
the same persistent buffer waits via the same queue. Only comm_free
does an explicit final wait.

OneCCL is NOT used: OneCCL 2021.17 hardcodes single-device-per-process
in communicator_impl.hpp:47 (condition devices.size() == 1), which is
incompatible with llama.cpp's single-process multi-GPU model.

Measured on dual Intel Arc Pro B70 (NEO 26.05.x, oneAPI 2025.3 +
DPC++ nightly):

  Llama-3.3-70B Q4_K_M, -sm tensor -fa 1 -ctk f16 -ctv f16:
    pp512 = 377.08 t/s  (vs 313.65 layer mode = +20.2%)
    tg128 = 17.40 t/s   (vs   9.74 layer mode = +78.6%)

  Qwen3-Coder-Next-80B-A3B Q3_K_M (MoE):
    pp512 = 216.56 t/s  (vs 156.58 meta-backend butterfly = +38.3%)
    tg128 = 17.60 t/s   (vs  14.31 meta-backend butterfly = +23.0%)

  Qwen3-4B Q4_K_M:
    pp64  = 984.51 t/s, tg16 = 49.29 t/s

Llama-3.3-70B in SYCL TP now comfortably beats production layer mode
on both prefill and decode. Coder-Next-80B-A3B (MoE) also wins on
both — the BF16 path is what unlocks the many-medium-allreduces
prefill pattern.

Build/CMake: no changes. No new dependencies. ~210 lines added across
ggml-sycl.h and ggml-sycl.cpp.

* Fix comments

* documentation update to address PR feedback

* Bring over my device-to-device memcpy chagnes

* move the dev2dev_memcpy calls to the upstream 7-parameter variety

* Fix a typo and remove a trailing whitespace
2026-06-25 08:35:21 +03:00
..
android android: fix missing screenshots for Android.md (#18156) 2025-12-19 09:32:04 +02:00
backend sycl : support --split-mode tensor (#24152) 2026-06-25 08:35:21 +03:00
development docs : update HOWTO-add-model.md (#23883) 2026-06-02 11:40:22 +02:00
multimodal docs : fix duplicated "the" in granitevision and model-conversion docs (#23767) 2026-05-27 09:34:06 +02:00
ops [SYCL] support OPs: conv_2d, conv_2d_dw, conv2d_transpose (#24600) 2026-06-18 09:40:03 +03:00
android.md docs/android.md: Add dependency libandroid-spawn for building in termux (#21812) 2026-06-22 05:48:31 +02:00
autoparser.md common : fix env names to all have LLAMA_ARG_ prefix (#23778) 2026-05-27 14:52:47 +03:00
build-riscv64-spacemit.md ci : update spacemit toolchain url and enhance curl command (#23642) 2026-05-25 10:43:24 +02:00
build-s390x.md docs: update s390x build docs (#19643) 2026-02-16 00:33:34 +08:00
build.md docs : update ZenDNN docs for Q8 support (#23791) 2026-05-31 10:26:42 +02:00
docker.md sycl : Improve SYCL doc (#23025) 2026-06-04 08:02:54 +03:00
function-calling.md docs: Update documentation with Granite 4.0/4.1 (#23404) 2026-05-22 20:35:46 +08:00
install.md docs: Add instructions to install llama.cpp from conda-forge (#22219) 2026-06-15 17:12:25 +02:00
llguidance.md llguidance build fixes for Windows (#11664) 2025-02-14 12:46:08 -08:00
multi-gpu.md Write a readme on Multi-GPU usage in llama.cpp (#22729) 2026-05-07 17:48:40 +02:00
multimodal.md mtmd: refactor preprocessor, add mtmd_image_preproc_out (#24736) 2026-06-18 12:04:39 +02:00
ops.md [SYCL] support OPs: conv_2d, conv_2d_dw, conv2d_transpose (#24600) 2026-06-18 09:40:03 +03:00
preset.md server: (router) rework -hf preset repo (#24739) 2026-06-18 12:45:23 +02:00
speculative.md server-bench : add speed-bench for speculative decoding benchmarking (#23869) 2026-05-29 23:09:47 +02:00