Pull requests / #1472

#1472 Intel Arc A770 (DG2, 16 GB) support in the SYCL port

open · @samsonnguyen · 0 comentários · No GitHub

BenchmarksModels & quantsDocumentation

Descrição

## Title
Intel Arc A770 (DG2, 16 GB) support in the SYCL port
Issue: Resolves #692

The Alchemist cards on `xe` drivers have some weird bugs, which unfortunately need to be worked around. I've tried to ensure that these flags don't affect builds for other cards, and documented the issues i ran into.

## Summary
The SYCL port was written for the Arc Pro B70. This makes it build and run correctly on an Arc A770 (Alchemist, `xe` driver, 16 GB) with the Qwen3.8-Flash-Next IQ3_XXS model, plus a few engine fixes the A770 exposed. Everything is additive or gated to the cases that need it (a build option, an env switch, or a memory size above 4 GiB).

Measured on an A770 (xe driver, forced probe), Xeon E5 v4 host (PCIe 3.0 x16, AVX2 only), Ubuntu 26.04, kernel 7.0, oneAPI 2026.1, engine 0.1.40.3, Qwen3.8-Flash-Next IQ3_XXS, `--stream-experts --expert-cache 5000 --vram-reserve-mib 1280 --kv int8 --spec 4 --mtp`, `STRATA_VERIFY_DEVICE_PLAN=1 STRATA_VERIFY_NO_HOST=1`, greedy, 128 new tokens:

| | tok/s |
|---|---|
| decode, 19-token prompt | 17.5 |
| 8,191-token prompt, prefill | 491 |
| 8,191-token prompt, decode | 13.7 (2.0 tokens per round; per-round time unchanged) |

Not measured here: the B70 or any other card, the parity tests (built with `STRATA_SYCL_PARITY=OFF`), models other than IQ3_XXS (and, earlier, the Coder IQ1_M).

## What changed
- **`-DSTRATA_SYCL_NO_XMX=ON`**: compiles the `joint_matrix` kernels out. IGC for dg2 dies with a floating point exception on them.
- **Free VRAM**: `dpct::get_memory_info` asks Level Zero Sysman when the SYCL aspect is missing (xe reports nothing, so `--expert-cache auto` saw 0 bytes).
- **Pinned expert mirror** is allocated in chunks of at most 3 GiB (a single host allocation is capped near 4 GiB), and a GGUF ring slot is published only after its read has finished.
- **`-DSTRATA_SYCL_LARGE_BUFFERS=ON`** (`-ze-opt-greater-than-4GB-buffer-required`): without it, a kernel reading an expert more than 4 GiB into the cache read garbage.
- **Reversed expert cache** (`STRATA_CACHE_REVERSE`, automatic when the arena is over 4 GiB): oneMKL's bf16/f16 GEMM returns zeros when an input matrix starts 4 GiB or more into an allocation, so a prompt of about 1.5k tokens or more decoded to token 0 when the prompt path borrowed cache slots. The coldest slots now sit at the lowest addresses, the loan is the tail of the cache and capped at 3.9 GiB, and the kernels reading slots take per-slot device offsets. Reproducer: `sycl/tests/repro/mkl_gemm_4gib.cpp`; host test: `sycl/tests/expert_cache_reverse_test.cpp`.
- **A device wait that gives up is an error**: each wait kernel counts timeouts per flag; the verifier refuses the window and names the flag (`STRATA_WAIT_TIMEOUT=warn` only reports, `STRATA_SPIN_MAX` sets the bound). Before, the window went on with data the host had not written and the recurrent state kept the garbage.
- **Adaptive tier in GPU-only mode**: `resident_plan` counts routed experts on the device, so the adaptive swaps run with `STRATA_VERIFY_NO_HOST` (hit rate 33% to 87% on the Coder IQ1_M), and a swap victim is only taken if it can be re-read from a pinned mirror.
- **Q6_K padded to 224 bytes** (`STRATA_Q6K_REPACK=1`, off by default): aligned weight loads in the decode mmvq kernel. +6% GPU-only decode on the Coder IQ1_M (9.77 to 10.37 tok/s); no measurable change on IQ3_XXS (17.5 against 17.2). `mmvq_bench --selftest` checks it against the GGUF layout.
- **Polled host memory stays plain when `STRATA_VERIFY_NO_HOST` is set**: nothing waits on a host store in that mode, and the uncached allocation cost 42 ms per decode window on the A770 (13.1 against 17.5 tok/s). Uncached allocation is unchanged in every other mode, and `STRATA_HOST_UNCACHED=0` still turns it off.
- **Docs**: `docs/INTEL_A770.md` (bring-up, what differs from the B70, measurements) and `docs/INTEL_A770_ISSUES.md` (the driver, runtime and compiler problems found, with workarounds), and a pointer in `docs/INTEL.md`.

## Extra Notes
- The A770 needs `IGC_EnableDPEmulation=1 OverrideDefaultFP64Settings=1` at build time (no fp64 in hardware; the engine uses double on purpose) and `UR_L0_ENABLE_RELAXED_ALLOCATION_LIMITS=1 ZES_ENABLE_SYSMAN=1` at run time. Details are in `docs/INTEL_A770.md`.
- I built with `-DSTRATA_SYCL_SPIN_MAX=20000`; the default for a non-B-series AOT build (2,000,000 polls) is what a plain build gets.
- The commits are in dependency order and can be reviewed one by one.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

No site

Links install, modelos, releases.