mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2282] [Bug] SYCL on a Meteor Lake iGPU (8086:7d55) won't start, then freezes: 3 small fixes resolves issues #920
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#920
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 @Bassai-Sho on GitHub (Oct 13, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2282
strata-alloc-fail.log
strata-window-hang.log
strata-start-log.log
What happened
On this integrated GPU the SYCL engine doesn't start, and once that is fixed it freezes after a few requests. There are three separate bugs, each with a small fix. With all three applied it runs steadily (see "What I tested").
expert cache auto: 0.00 GiB free ... -> 0 slotssycl/include/dpct/device.hppExpertCache: cudaMalloc(33.02 GiB) failedUR_L0_ENABLE_RELAXED_ALLOCATION_LIMITS=1STRATA_WINDOW_SYNC=1Two more findings follow the bugs: the engine's free memory at start-up depends on
MemAvailable, and setup misreads this GPU's memory size.Related: #515 asked for support for a shared-memory Intel iGPU (Arc B390, on Windows). This report is the Meteor Lake iGPU on Linux.
System
ASUS NUC14RVH-B, Core Ultra 5 125H, Intel Arc iGPU (Meteor Lake-P,
8086:7d55,xedriver), 64 GB RAM shared with the GPU, Ubuntu 24.04, kernel 7.0.0-38.Strata 0.1.43 (commit
7695859a), JIT build in thestrata-sycl-devDocker image (built fromllama-sycl-b70:stable; oneAPI DPC++/C++ 2026.1.0, NEO 26.35.39758.10). Model: IQ2_XS, 8K context. Retested on v0.1.43.1 (a0116b27, 16K context).What I tested
session is up (engine 0.1.43.1)): 20 short requests in a row (about 7 to 12 tokens/s on the 15 to 17 token answers), six 300-token answers (33.7 to 34.8 s each), a 922-token prompt twice (32.5 s cold, 1.8 s repeated), and a request with thinking (151 tokens, 17.6 s). All completed../setup.sh --low-ram auto --backend sycl --checkstill reports 0.2 GB of VRAM (see "Also"), andset_integrated()still has no caller in the source (bug 1).Bug 1: free memory reads as 0
Symptom:
expert cache auto: 0.00 GiB free ... -> 0 slots, thenno VRAM is left for the expert cache.Cause:
device_free_bytes()reads free RAM only if the GPU is flagged as integrated, and nothing sets that flag.sycl/include/dpct/device.hpp:201is the definition ofset_integrated(), andgrep -rn set_integrated sycl src includefinds no call, on v0.1.43.1 as well.Fix: in
get_device_info()insycl/include/dpct/device.hpp, mark the GPU as integrated, then rebuild:The local patch below does the same for PCI id 7d55 only (
set_integrated(1)), and that is the version I ran.Note: after the fix the log still prints
get_memory_info: ext_intel_free_memory is not supported., and the serve check can print0 MiB of VRAM free ... LOW. Other call sites query the device directly, so these lines are wrong on an iGPU, but they did not stop it from running.Bug 2: the expert cache can't be allocated
ExpertCache: cudaMalloc(33.02 GiB) failed. The engine retries at 75% of the size each time (eight failures, down to 4.40 GiB), then tries 2,449 slots, and stops withREFUSED: 21384 experts are neither in VRAM nor mirrored.clinfo:Max memory allocation 4294959104 (4GiB)), and the expert cache is one 33 GiB allocation.UR_L0_ENABLE_RELAXED_ALLOCATION_LIMITS=1(a Level Zero setting that lifts the 4 GiB limit). Suggest making it the default for integrated GPUs.Bug 3: freeze after a few requests
no progress for 60 s ... (verify window: waiting for the GPU to finish the window ...). The attached stall report shows all 8 expert-pool workers parked (sleeping) when it fires.sycl/src/core/verify.cpp:2031for the A750. TheSTRATA_WINDOW_SYNCfix for it is on by default only on i915 (line 2035), and this GPU uses xe.STRATA_WINDOW_SYNC=1. Suggest making it the default for this GPU, or for xe.How to apply the fixes
Apply the bug 1 change and rebuild the engine.
Add the two settings to the
envblock ofstrata-<model>.json:Before each start, run
sync; echo 2 | sudo tee /proc/sys/vm/drop_caches(the next section explains why).Start the model.
I also used
--vram-reserve-mib 2048,STRATA_UMA_HEADROOM_GIB=12andSTRATA_MIRROR_MIB=1024, which are my choices for this machine, not part of the fixes.The engine's free memory at start-up depends on
MemAvailableOnce the GPU is flagged as integrated,
device_free_bytes()(sycl/src/core/expert_cache.cpp) takesMemAvailablelessSTRATA_UMA_HEADROOM_GIB(default 6, I set 12) as the free figure, and the expert cache is sized from it. IfMemAvailableis low at start, the cache comes out too small and the start is refused.A start that was refused (patched 0.1.43 engine, started by the v0.1.43.1 setup):
Right after it failed,
free -hshowed 35 GiB used andMemAvailablewas 27,441,636 kB (26.2 GiB), andpgreplisted no Strata process. I have not isolated what held the memory.The same config after
sync; echo 2 | sudo tee /proc/sys/vm/drop_caches:MemAvailablewas 59,767,612 kB (57.0 GiB) and the next start read:On the v0.1.43.1 engine the same command gave
MemAvailable59,150,540 kB (56.4 GiB) and a start with 38.17 GiB free and all 24,576 experts cached. That is about 6 GiB less thanMemAvailableminus my 12 GiB headroom (44.4 GiB); I have not traced the difference.Over all starts:
strata-iq2_xs.log(attached asstrata-start-log.log) holds 11 starts of this config. Eight read 37.65 to 39.74 GiB free and loaded all 24,576 experts. Three read 11.29 to 13.22 GiB free, got 5,697 to 7,131 cache slots, and were refused (REFUSED: 16695,18134and17162 experts are neither in VRAM nor mirrored). The last start is the v0.1.43.1 engine; the ten before it printengine 0.1.43.Suggestion: warn at start-up when the free figure is far below
MemTotalon an integrated GPU. The 0.1.40.2 fix for "host OOM at start on Linux when RAM was mostly file cache" looks related and may be worth extending to this case.How to reproduce
I saw bugs 1 to 3 on 0.1.43. Start with the unmodified code to see bug 1. Add fix 1 to see bug 2. Add fix 2, start, and run this loop from a second terminal to see bug 3. Add fix 3 and the loop completes (it did on v0.1.43.1).
Also: setup misreads this GPU's memory
sycl/setup_intel.pyreads this GPU's memory size from PCI BAR 2 (0.25 GB), so setup treats it as a card with almost no memory.Output of
./setup.sh --low-ram auto --backend sycl --checkon v0.1.43.1, unmodified and with the local patch:Intel Intel GPU 7d55 (xe), 0.2 GB VRAMIntel Arc Graphics (Meteor Lake-P, shared RAM), 45.8 GB VRAMWith the patch, IQ3_XXS shows "does not fit" because the patch assumes no pinned mirror for this GPU. That is my choice for this machine, not a measured limit.
The patch below is what I run locally. It sets the integrated flag (bug 1), writes the settings for bugs 2 and 3 (plus my headroom and mirror values) into the generated config, and gives setup the right memory size. It only changes anything for PCI id 7d55.
Local patch (2 files, +15 / -3)
Strata version, GPU, OS
0.1.43 (bugs found), v0.1.43.1 (re-tested with the patch) · Intel Arc Graphics (Meteor Lake-P iGPU, 8086:7d55), 64 GB RAM shared · Ubuntu 24.04, kernel 7.0.0-38Engine log
sycl-lsinside thellama-sycl-b70:stablecontainer (GPU lines only):Attached (username and hostname replaced):
strata-alloc-fail.log: bug 2, from the 0.1.43 workstrata-window-hang.log: bug 3, from the 0.1.43 workstrata-start-log.log: the 11 starts described under "The engine's free memory at start-up depends onMemAvailable"@qiuzan2001 commented on GitHub (Oct 15, 2026):
For the setup part ("setup misreads this GPU's memory size"), reproduced on Linux with main
296b59d2using a faked sysfs entry for 8086:7d55 on xe with a 256 MiB BAR 2:sycl/setup_intel.intel_gpus()returns{'name': 'Intel Intel GPU 7d55 (xe)', 'vram_gb': 0.25, ...}. The size comes fromsycl/setup_intel.py:78-81, which takes resource line 2 (BAR 2) as the card's VRAM; that is right for a discrete Arc card, but on an integrated GPU it is only the aperture, and the memory is shared system RAM. The same code also doubles the vendor in the name: an unknown device id getsname = "Intel GPU <id> (xe)"(line 77) and then"Intel " + name(line 84). The engine-side bugs need the hardware and were not checked here.@Bassai-Sho commented on GitHub (Oct 15, 2026):
Hi @qiuzan2001 , thanks for taking the time to reproduce the setup part, including the doubled "Intel Intel" name. That's really helpful.
On the engine side: bug 1 can be checked without the hardware. On current main,
git grep -n set_integrated origin/main -- sycl src includefinds only the definition (sycl/include/dpct/device.hpp:201) and no caller, sodevice_free_bytes()never takes its shared-memory branch for an integrated GPU. Bugs 2 and 3 need the GPU, and I'm happy to test any change on this machine..I also have a follow-up on the free-memory section. Thanks to @hansy2 write-up in #2412, I now know what holds the memory that
MemAvailabledoesn't count: the TTM page pool. I wrote above that I hadn't isolated it, so here are my measurements on a Meteor Lake iGPU, plus what happened when I capped the pool, in case they're useful.System: ASUS NUC14RVH-B, Core Ultra 5 125H, Arc iGPU
8086:7d55(xe), 62 GiB DDR5 shared with the GPU, Ubuntu 24.04, kernel 7.0.0-38-generic, Strata 0.1.43.1 (engine rebuilt from that source with the local patch from this issue). The cap tests below used Swift 1.5 IQ3_XXS with--stream-experts(24,576 experts, about 20,000 to 21,800 fit in the cache, the rest are served from the pinned mirror).1. The pool holds the memory. With the engine stopped,
MemAvailablewas 24.6 GiB./sys/kernel/debug/ttm/page_poolshowed 8,141,284 pages (31.06 GiB) against a limit of 8,141,468 pages (half the RAM, thepage_pool_sizedefault). Aftersync; echo 2 > /proc/sys/vm/drop_cachesthe pool held 2 pages andMemAvailablewas 55.6 GiB. That is a gain of 31.02 GiB, the pool's size, so the pool's shrinker is evidently triggered bydrop_caches=2. That is why thedrop_cachesstep in "How to apply the fixes" works./proc/meminfoshowedGPUActive: 807019564 kB(770 GiB) withGPUReclaim: 0 kB, as reported in #2412.2. Effect on Strata. A start after a previous run read 10 to 13 GiB free (about 39 GiB after
drop_caches) and was refused. With IQ2_XS:expert cache auto: 12.60 GiB free ... -> 6378 slots, thenREFUSED: 17162 experts are neither in VRAM nor mirrored; in one log of 11 starts of that config, 3 were refused this way.3. Capping the pool (
/sys/module/ttm/parameters/page_pool_size, runtime), Swift IQ3_XXS, starts withoutdrop_caches:The pool refills to its cap after every stop, and what it holds is not counted in
MemAvailable, so the engine sizes the cache about that much too small. With the 1 GiB cap the cache ended about 3 GiB below the best case (about 20,000 against 21,800 experts in VRAM). That is more than the cap alone explains, and I haven't found the rest. Because more experts then come from the mirror, I raisedSTRATA_MIRROR_MIBfrom 8192 to 12288 (about 4,650 experts need about 7.5 GiB). Decode speed did not change: 37.0 to 38.2 s per 300-token answer (8.2 tok/s), against 40.5 to 42.5 s before.An engine killed with
docker kill(exit code 137) was restarted by the server without anydrop_cachesand came up (35.87 GiB free).I have also made the cap persistent with
options ttm page_pool_size=262144in/etc/modprobe.d/ttm-pool.confplusupdate-initramfs -uThanks again to you both for the help!
@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.
@sashebalchev commented on GitHub (Oct 22, 2026):
Bug 1 here is also present on a second chip and on the current engine, and there is now a draft PR with exactly this fix: #3729.
Environment: Framework 13 Pro, Core Ultra X7 358H (Panther Lake), Arc B390 iGPU (xe), 64 GB shared, Linux 7.3, engine 0.1.46.3, Coder IQ1_M,
--serve --expert-cache 12288 --stream-experts --mtp.Before (unpatched):
expert cache 82 slots, 0.16 GiB of VRAMeven with an explicit--expert-cache 12288;12206 of 12206 experts missing from VRAMmirrored in pinned host memory and read over PCIe. 91-token answer at 6.8 tok/s (one cold request).After (
prop.set_integrated(dev.has(sycl::aspect::ext_oneapi_is_integrated_gpu) ? 1 : 0);, same command, rebuilt binary only):expert cache 12288 slots, 23.42 GiB,token graph hit path: 12288 resident experts; 14.8 tok/s on the first request, 21.2 tok/s on the second. One cold and one warm request on the patched build, not repeated; per-run table in the PR.set_integrated()still has no caller onmain(grep -rn set_integrated sycl src include), sodevice_free_bytes()never reaches itsMemAvailablebranch on SYCL. Bugs 2 and 3 from this report did not show up on the B390 (the 23.4 GiB cache allocated fine and I have not hit the hang). TheMemAvailabledependency matches the TTM page-pool finding in #2412.I am adding this as new evidence and leave it to a maintainer to decide whether to reopen.