mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1545] Intel A770 xe driver #617
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#617
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @flare04 on GitHub (Oct 8, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1545
strata-a770-xe-alchemist.patch
Arc A770 16 GB — Alchemist on
xe: three fixes, with numbersI got the SYCL port running on an Arc A770 16 GB on the
xedriver, which is the gap in the two recipes the docs cover: every Alchemist result here is an A750 oni915, and everyxeresult is a Battlemage card. That matters because the port's Alchemist defaults are keyed off the driver name (intel_i915_gpu()), so an Alchemist card onxesilently inherits the Battlemage values.Nothing here changes behaviour on an NVIDIA, AMD,
i915or Battlemage-on-xecard — two of the three are diagnostic/reporting paths and the third only fires when a driver reports no free memory at all.Host: Minisforum BD895i SE (Ryzen 9 8945HX), 29 GB usable RAM, CachyOS kernel 7.2.9,
xe, NEO 26.35.39758, oneAPI 2026.0, native build (no Docker),level-zero-loader1.32.0.Model: Coder IQ1_M (23.42 GiB of experts), 64K context, int8 KV, MTP
--spec 4 --spec-min-p 0.5,--mmap-experts.Results
Decode is below the Pro B50's ~23 tok/s from #423 and the reason is placement, not the port: that model's experts all fit VRAM, this one's cannot (a 4 GiB pinned-host ceiling, below), so the CPU computes 7–15 distinct experts per layer and the GPU waits for them.
1. The uncached doorbell needs
<level_zero/ze_api.h>at build time — without it, every token is 0sycl_queue.hppallocates the doorbell/ring buffers withZE_HOST_MEM_ALLOC_FLAG_BIAS_UNCACHED, but only whenSTRATA_HAVE_ZEis defined, and that needs the header at build time. Distributions split the Level Zero loader from its headers (Arch:level-zero-loadervslevel-zero-headers; Ubuntulibze1vslibze-dev), so a box whose Level Zero runtime works fine builds the port without them.host_malloc_polledthen falls back tosycl::malloc_host, a running kernel never sees the host's stores, every ring wait runs tokSpinMax, and the window goes on with the CPU experts' rows missing: NaN logits and token 0 for every token.The failure is completely silent — clean build, engine loads, prefill reports a sane rate, parity tests pass. Measured on one config, before and after:
wait for ringspool(the CPU experts, unchanged)The host was never slow — it served its experts in 27 ms while the GPU waited 42 s for a store it could not see.
The patch adds a
check_include_file_cxxat configure time that warns when the header is missing (naming both failure and package), plus-DSTRATA_LZ_INCLUDE=<dir>for a header installed elsewhere, and linksze_loader, which the doorbell calls directly. It does not vendor the header.nm -D strata | grep zeMemAllocHosttells you whether a build has it.2.
xereports no free VRAM, so every cache sized to 0 slotsThis driver does not expose
sycl::aspect::ext_intel_free_memory(ZES_ENABLE_SYSMAN=1does not change it), so dpct returns 0 bytes free and--specrefuses to start withit needs --spec T (T >= 2).device_free_bytes()already has a DRM-fdinfo fallback, but its guard is:which can never be true for
free_b == 0(unsigned) — so the fallback is unreachable exactly in the case that needs it. Arming it onfree_b == 0as well is the whole fix;xedoes reportdrm-total-vram0in/proc/self/fdinfo/*. Expert cache: 0 slots → 1,934 (3.72 GiB), nothing else changed. Thei915case the guard was written for is untouched.3. The serve-time VRAM check read a bare 0
generate.cpp's "N MiB of VRAM free with everything loaded" check calledget_memory_info()directly instead ofdevice_free_bytes()like the four other free-VRAM readings in the same file. Onxeit therefore printed0 MiB free ... add --vram-reserve-mib Non every start no matter how high the reserve was raised — advice that chases its own tail, and a card that could never satisfy it. Routed throughdevice_free_bytes()it reports the true 2,144 MiB.Two runtime knobs (not in the patch)
STRATA_WINDOW_SYNC=1is required here.verify.cppdefaults it to 1 oni915and 0 elsewhere, for the documented Alchemist behaviour that a window launched behind other in-flight GPU work never starts. This card reportsxe, so it gets 0, and long runs then stall withverify: timed out at layer 0— with the host having already served that layer, so it is not the handshake of #1. Measured on 300-token runs with the adaptive expert tier on (its async swaps are exactly the "other GPU work"):WINDOW_SYNC=0(the inherited default)WINDOW_SYNC=1WINDOW_SYNC=0+--adapt-every 0Both levers work, so the stall needs the adaptive tier and a window launched behind it. I deliberately left the default alone: keying it correctly means detecting Alchemist by architecture rather than driver name, and 8 runs on one machine is thin evidence for a change that would cost every Battlemage-on-
xecard a queue drain per window. Your call — happy to send that as a follow-up if you'd rather it were automatic.--mmap-expertsis required on a small-RAM host. Without it the engine pins the whole 23.42 GiB arena (cudaHostRegister PORTABLE ok), leaving ~3 GB reclaimable on 29 GB: long runs were OOM-killed (exit 137) mid-decode with 338k major faults and 7.3 GiB swapped. mmap costs decode (12.27 → 7.0–7.5 tok/s) but keeps the box alive. Prefill is unaffected — 3.7 tok/s on the first run after boot, 24–25 once the file cache holds the pack, in either mode.Related, and why the B70's
--stream-expertsrecipe is not available here: its mirror is one pinned host allocation, and amalloc_hostladder on this card returns null at 4 GiB (2 GiB succeeds, held or freed), withulimit -lat 8 MiB and unraisable without root.Recipe
The pairing that is easy to get wrong:
STRATA_VERIFY_NO_HOST=0(the Alchemist value, since the CPU computes experts outside VRAM here) together withSTRATA_WINDOW_SYNC=1(also Alchemist) on a card that reportsxe.NO_HOST=1— the B70's — hangs the window here;WINDOW_SYNC=0— the Battlemage-on-xedefault — stalls long runs.The A750's documented teardown crash (a CPU-pool worker segfaulting on exit) also happens here, as does
UR_RESULT_ERROR_UNINITIALIZEDat exit — both after a completed generation, so a run is judged by itsdecode/outputlines, not its exit code.The patch also adds all of this to
docs/INTEL_ARC.md, including a row in the "what has been run" table, the header as a build dependency, and a correction to "not tested by anyone yet" (the Alchemist A-series is now tested — onxe, noti915).Attached:
strata-a770-xe-alchemist.patch(4 files, +187/−7). Verified withgit apply --checkandgit amagainst a freshmainclone at6674a00, then built with icpx.This is all running on AMD Ryzen 9 8945HX with 32Gb RAM
I personally didn't get this working I used Qwen3.8max
@beyondcr commented on GitHub (Oct 9, 2026):
I am getting 16.9 to 24 t/s decode 76-85 t/s prefill using xe driver, qwen3.8-flash-next-uncensored-iq3-xxs, v0.1.39-sycl A770 with 64gb on a AMD Ryzen 9 3950X still fine tuning and making things work as I go.
@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.