[GH-ISSUE #2282] [Bug] SYCL on a Meteor Lake iGPU (8086:7d55) won't start, then freezes: 3 small fixes resolves issues #920

Closed
opened 2026-11-04 01:47:02 +07:00 by bsakaguchi · 4 comments
Owner

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").

# What you see Fix
1 expert cache auto: 0.00 GiB free ... -> 0 slots one line in sycl/include/dpct/device.hpp
2 ExpertCache: cudaMalloc(33.02 GiB) failed UR_L0_ENABLE_RELAXED_ALLOCATION_LIMITS=1
3 engine stalls on the 3rd to 5th request STRATA_WINDOW_SYNC=1

Two 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, xe driver), 64 GB RAM shared with the GPU, Ubuntu 24.04, kernel 7.0.0-38.
Strata 0.1.43 (commit 7695859a), JIT build in the strata-sycl-dev Docker image (built from llama-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

  • Bugs 1 to 3 were found on 0.1.43.
  • v0.1.43.1 with the patch (engine rebuilt from that source; the log says 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.
  • v0.1.43.1 without the patch: ./setup.sh --low-ram auto --backend sycl --check still reports 0.2 GB of VRAM (see "Also"), and set_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, then no 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:201 is the definition of set_integrated(), and grep -rn set_integrated sycl src include finds no call, on v0.1.43.1 as well.

  • Fix: in get_device_info() in sycl/include/dpct/device.hpp, mark the GPU as integrated, then rebuild:

    prop.set_integrated(dev.has(sycl::aspect::ext_oneapi_is_integrated_gpu));
    

    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 print 0 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

  • Symptom: 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 with REFUSED: 21384 experts are neither in VRAM nor mirrored.
  • Cause: this GPU allows at most 4 GiB in one allocation (clinfo: Max memory allocation 4294959104 (4GiB)), and the expert cache is one 33 GiB allocation.
  • Fix: set 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

  • Symptom: the engine stalled during the 3rd request in one run and the 5th in the next (two and four requests had finished first), then 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.
  • Cause (likely): the hang described in the comment at sycl/src/core/verify.cpp:2031 for the A750. The STRATA_WINDOW_SYNC fix for it is on by default only on i915 (line 2035), and this GPU uses xe.
  • Fix: set STRATA_WINDOW_SYNC=1. Suggest making it the default for this GPU, or for xe.

How to apply the fixes

  1. Apply the bug 1 change and rebuild the engine.

  2. Add the two settings to the env block of strata-<model>.json:

    "UR_L0_ENABLE_RELAXED_ALLOCATION_LIMITS": "1",
    "STRATA_WINDOW_SYNC": "1"
    
  3. Before each start, run sync; echo 2 | sudo tee /proc/sys/vm/drop_caches (the next section explains why).

  4. Start the model.

I also used --vram-reserve-mib 2048, STRATA_UMA_HEADROOM_GIB=12 and STRATA_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 MemAvailable

Once the GPU is flagged as integrated, device_free_bytes() (sycl/src/core/expert_cache.cpp) takes MemAvailable less STRATA_UMA_HEADROOM_GIB (default 6, I set 12) as the free figure, and the expert cache is sized from it. If MemAvailable is 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):

expert cache auto: 12.60 GiB free, 2048 MiB reserved (+143 MiB for the draft head) -> 6378 slots
...
REFUSED: 17162 experts are neither in VRAM nor mirrored; ... raise STRATA_MIRROR_MIB or the free RAM, or lower --max-context

Right after it failed, free -h showed 35 GiB used and MemAvailable was 27,441,636 kB (26.2 GiB), and pgrep listed 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: MemAvailable was 59,767,612 kB (57.0 GiB) and the next start read:

expert cache auto: 38.92 GiB free, 2048 MiB reserved (+143 MiB for the draft head) -> 24576 slots
expert cache 24576 slots, 33.02 GiB of VRAM

On the v0.1.43.1 engine the same command gave MemAvailable 59,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 than MemAvailable minus my 12 GiB headroom (44.4 GiB); I have not traced the difference.

Over all starts: strata-iq2_xs.log (attached as strata-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, 18134 and 17162 experts are neither in VRAM nor mirrored). The last start is the v0.1.43.1 engine; the ten before it print engine 0.1.43.

Suggestion: warn at start-up when the free figure is far below MemTotal on 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).

ok=1
for L in {A..T}; do
  curl -sf localhost:8085/v1/chat/completions -H 'Content-Type: application/json' \
    -d "{\"model\":\"x\",\"messages\":[{\"role\":\"user\",\"content\":\"Name one animal that starts with the letter $L.\"}],\"max_tokens\":24,\"chat_template_kwargs\":{\"enable_thinking\":false}}" \
    >/dev/null || { echo "failed at $L"; ok=0; break; }
done
[ "$ok" = 1 ] && echo "all 20 done"

Also: setup misreads this GPU's memory

sycl/setup_intel.py reads 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 --check on v0.1.43.1, unmodified and with the local patch:

Unmodified With the local patch
GPU line Intel Intel GPU 7d55 (xe), 0.2 GB VRAM Intel Arc Graphics (Meteor Lake-P, shared RAM), 45.8 GB VRAM
Warning "less than 12 GB of VRAM ... most experts stay on the CPU" none
IQ2_XS "fits with part of its experts mirrored in RAM (slower)" "fits in VRAM"
IQ3_XXS "fits with part of its experts mirrored in RAM (slower)" "does not fit"

With 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)
diff --git a/sycl/include/dpct/device.hpp b/sycl/include/dpct/device.hpp
index b55d2dcf..8fd8ddcc 100644
--- a/sycl/include/dpct/device.hpp
+++ b/sycl/include/dpct/device.hpp
@@ -345,6 +345,9 @@ static void get_device_info(device_info &out, const sycl::device &dev) {
   if (dev.has(sycl::aspect::ext_intel_device_id)) {
     prop.set_device_id(
         dev.get_info<sycl::ext::intel::info::device::device_id>());
+    // Meteor Lake-P iGPU (PCI 7d55) only: nothing else sets the integrated flag, so device_free_bytes()
+    // (core/expert_cache.cpp) never took its unified-memory branch and read 0 bytes free on this GPU.
+    if ((prop.get_device_id() & 0xffffu) == 0x7d55) prop.set_integrated(1);
   }
   if (dev.has(sycl::aspect::ext_intel_device_info_uuid)) {
     prop.set_uuid(dev.get_info<sycl::ext::intel::info::device::uuid>());
diff --git a/sycl/setup_intel.py b/sycl/setup_intel.py
index 8c0ed962..9dc2cc76 100644
--- a/sycl/setup_intel.py
+++ b/sycl/setup_intel.py
@@ -52,6 +52,7 @@ INTEL_ARC = {"e223": ("Arc Pro B70", 32.0), "e221": ("Arc Pro B60", 24.0), "e211
 # pinned mirror (--mmap-experts + STRATA_VERIFY_NO_HOST=0 - docs/INTEL.md, "Arc A750"). On xe (the A770) the mirror is
 # built in chunks past that limit and the A-series uses the ordinary streamed path; see to_sycl().
 ALCHEMIST_IDS = frozenset({"56a0", "56a1", "56a2", "56a5", "56a6", "5690"})
+MTL_IGPU = "7d55"   # Meteor Lake-P iGPU on xe: no VRAM, the GPU shares the RAM. Only this id takes the changes marked MTL.
 
 
 def intel_gpus():
@@ -75,6 +76,8 @@ def intel_gpus():
             if driver != "xe":                          # i915 without a known Arc id is an integrated GPU
                 continue
             name = f"Intel GPU {devid} (xe)"
+        if devid == MTL_IGPU and driver == "xe":        # MTL: BAR 2 is a 256 MB aperture, not memory; the GPU can address ~93% of
+            name, vram = "Arc Graphics (Meteor Lake-P, shared RAM)", max(S.ram_gb() * 0.93 - 12, 0.1)   # the RAM, less 12 for the OS
         if not vram:                                    # resource line 2 (BAR 2) is the VRAM aperture on xe cards
             try:
                 start, end, _ = (dev / "resource").read_text().splitlines()[2].split()
@@ -172,7 +175,8 @@ def to_sycl(cfg: dict, exe: Path, ram: float, keep: dict, vram_gb: float = 0.0,
         args += ["--kv-resident", "32768"]
     asked_reserve = flag(args, "--vram-reserve-mib")    # setup writes it only when the user gave it
     drop(args, "--vram-reserve-mib", True)
-    reserve = asked_reserve or (str(SMALL_RESERVE_MIB) if small_card(vram_gb, driver) else
+    reserve = asked_reserve or ("2048" if devid == MTL_IGPU else   # MTL: what is allocated after the expert cache
+                                str(SMALL_RESERVE_MIB) if small_card(vram_gb, driver) else
                                 "1024" if ctx <= 32768 else "2048")
     alchemist = driver == "i915" or devid in ALCHEMIST_IDS
     if driver == "i915":
@@ -183,7 +187,7 @@ def to_sycl(cfg: dict, exe: Path, ram: float, keep: dict, vram_gb: float = 0.0,
         args += ["--vram-reserve-mib", reserve]
     else:
         args += ["--stream-experts", "--vram-reserve-mib", reserve]
-    if ctx > 32768 or vram_gb >= 24:                    # long contexts: 4096-token chunks keep the prompt buffers small; a
+    if ctx > 32768 or (vram_gb >= 24 and devid != MTL_IGPU):                    # long contexts: 4096-token chunks keep the prompt buffers small; a
         drop(args, "--prefill", True)                   # 24 GB+ card with part of the experts in the RAM mirror streams those
         args += ["--prefill", "4096"]                   # over PCIe once per chunk, so fewer, bigger chunks read the prompt
                                                         # faster (Arc Pro B70, IQ3_S, a 4,095-token prompt: 2,048-token
@@ -200,6 +204,11 @@ def to_sycl(cfg: dict, exe: Path, ram: float, keep: dict, vram_gb: float = 0.0,
         # first launch - "'double' is not supported in ... device", the engine dies on the first request with a
         # temperature - unless the driver emulates it (docs/INTEL.md)
         env.update({"IGC_EnableDPEmulation": "1", "OverrideDefaultFP64Settings": "1", "NEOReadDebugKeys": "1"})
+    if devid == MTL_IGPU:   # MTL, each measured on this machine (notes: strata-issue-meteorlake.md)
+        env.update({"UR_L0_ENABLE_RELAXED_ALLOCATION_LIMITS": "1",   # the 33 GiB expert cache is one allocation; the device maximum is 4 GiB
+                    "STRATA_WINDOW_SYNC": "1",                       # without it a window never started, after 3 to 5 requests
+                    "STRATA_UMA_HEADROOM_GIB": "12",                 # the engine's free RAM is MemAvailable less this
+                    "STRATA_MIRROR_MIB": "1024"})                    # no big pinned mirror: the cache holds every expert
     if exe != ROOT / "build-sycl-aot" / "strata":
         env["STRATA_SYCL_BIN"] = exe.relative_to(ROOT).as_posix()
     if MOUNT.resolve() != ROOT.parent.resolve():
@@ -250,7 +259,7 @@ def install(argv) -> None:
             m = msg.split()[0]
             d = S.MODELS.get(m, {})
             shard1 = d.get("download_gb", 0) - 28.8          # all but the per-layer lookup table (read from disk)
-            room = intel[0]["vram_gb"] - 3 + max(0.0, real_ram - 10)   # VRAM, plus a pinned host mirror (or the CPU)
+            room = intel[0]["vram_gb"] - 3 + (0.0 if intel[0].get("devid") == MTL_IGPU else max(0.0, real_ram - 10))   # VRAM, plus a pinned host mirror (or the CPU); MTL: no mirror
             msg = (f"  {m:8s} ~{shard1:.0f} GB of weights: " +
                    ("fits in VRAM" if shard1 <= intel[0]["vram_gb"] - 1.5 else
                     "fits, the experts the card does not hold are computed on the CPU (slower)" if alch and shard1 <= room else

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-38

Engine log

sycl-ls inside the llama-sycl-b70:stable container (GPU lines only):

[level_zero:gpu][level_zero:0] Intel(R) oneAPI Unified Runtime over Level-Zero, Intel(R) Arc(TM) Graphics 12.71.4 [1.17.39758+10]
[opencl:gpu][opencl:1] Intel(R) OpenCL Graphics (integrated), Intel(R) Arc(TM) Graphics OpenCL 3.0 NEO  [26.35.39758.10]

Attached (username and hostname replaced):

  • strata-alloc-fail.log: bug 2, from the 0.1.43 work
  • strata-window-hang.log: bug 3, from the 0.1.43 work
  • strata-start-log.log: the 11 starts described under "The engine's free memory at start-up depends on MemAvailable"
Originally created by @Bassai-Sho on GitHub (Oct 13, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/2282 [strata-alloc-fail.log](https://github.com/user-attachments/files/33389649/strata-alloc-fail.log) [strata-window-hang.log](https://github.com/user-attachments/files/33389648/strata-window-hang.log) [strata-start-log.log](https://github.com/user-attachments/files/33389650/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"). | # | What you see | Fix | |---|---|---| | 1 | `expert cache auto: 0.00 GiB free ... -> 0 slots` | one line in `sycl/include/dpct/device.hpp` | | 2 | `ExpertCache: cudaMalloc(33.02 GiB) failed` | `UR_L0_ENABLE_RELAXED_ALLOCATION_LIMITS=1` | | 3 | engine stalls on the 3rd to 5th request | `STRATA_WINDOW_SYNC=1` | Two 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`, `xe` driver), 64 GB RAM shared with the GPU, Ubuntu 24.04, kernel 7.0.0-38. Strata 0.1.43 (commit `7695859a`), JIT build in the `strata-sycl-dev` Docker image (built from `llama-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 - **Bugs 1 to 3** were found on 0.1.43. - **v0.1.43.1 with the patch** (engine rebuilt from that source; the log says `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. - **v0.1.43.1 without the patch:** `./setup.sh --low-ram auto --backend sycl --check` still reports 0.2 GB of VRAM (see "Also"), and `set_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`, then `no 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:201` is the definition of `set_integrated()`, and `grep -rn set_integrated sycl src include` finds no call, on v0.1.43.1 as well. - **Fix:** in `get_device_info()` in `sycl/include/dpct/device.hpp`, mark the GPU as integrated, then rebuild: ```cpp prop.set_integrated(dev.has(sycl::aspect::ext_oneapi_is_integrated_gpu)); ``` 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 print `0 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 - **Symptom:** `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 with `REFUSED: 21384 experts are neither in VRAM nor mirrored`. - **Cause:** this GPU allows at most 4 GiB in one allocation (`clinfo`: `Max memory allocation 4294959104 (4GiB)`), and the expert cache is one 33 GiB allocation. - **Fix:** set `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 - **Symptom:** the engine stalled during the 3rd request in one run and the 5th in the next (two and four requests had finished first), then `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. - **Cause (likely):** the hang described in the comment at `sycl/src/core/verify.cpp:2031` for the A750. The `STRATA_WINDOW_SYNC` fix for it is on by default only on i915 (line 2035), and this GPU uses xe. - **Fix:** set `STRATA_WINDOW_SYNC=1`. Suggest making it the default for this GPU, or for xe. #### How to apply the fixes 1. Apply the bug 1 change and rebuild the engine. 2. Add the two settings to the `env` block of `strata-<model>.json`: ```json "UR_L0_ENABLE_RELAXED_ALLOCATION_LIMITS": "1", "STRATA_WINDOW_SYNC": "1" ``` 3. Before each start, run `sync; echo 2 | sudo tee /proc/sys/vm/drop_caches` (the next section explains why). 4. Start the model. I also used `--vram-reserve-mib 2048`, `STRATA_UMA_HEADROOM_GIB=12` and `STRATA_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 `MemAvailable` Once the GPU is flagged as integrated, `device_free_bytes()` (`sycl/src/core/expert_cache.cpp`) takes `MemAvailable` less `STRATA_UMA_HEADROOM_GIB` (default 6, I set 12) as the free figure, and the expert cache is sized from it. If `MemAvailable` is 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): ``` expert cache auto: 12.60 GiB free, 2048 MiB reserved (+143 MiB for the draft head) -> 6378 slots ... REFUSED: 17162 experts are neither in VRAM nor mirrored; ... raise STRATA_MIRROR_MIB or the free RAM, or lower --max-context ``` Right after it failed, `free -h` showed 35 GiB used and `MemAvailable` was 27,441,636 kB (26.2 GiB), and `pgrep` listed 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`:** `MemAvailable` was 59,767,612 kB (57.0 GiB) and the next start read: ``` expert cache auto: 38.92 GiB free, 2048 MiB reserved (+143 MiB for the draft head) -> 24576 slots expert cache 24576 slots, 33.02 GiB of VRAM ``` On the v0.1.43.1 engine the same command gave `MemAvailable` 59,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 than `MemAvailable` minus my 12 GiB headroom (44.4 GiB); I have not traced the difference. **Over all starts:** `strata-iq2_xs.log` (attached as `strata-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`, `18134` and `17162 experts are neither in VRAM nor mirrored`). The last start is the v0.1.43.1 engine; the ten before it print `engine 0.1.43`. Suggestion: warn at start-up when the free figure is far below `MemTotal` on 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). ``` ok=1 for L in {A..T}; do curl -sf localhost:8085/v1/chat/completions -H 'Content-Type: application/json' \ -d "{\"model\":\"x\",\"messages\":[{\"role\":\"user\",\"content\":\"Name one animal that starts with the letter $L.\"}],\"max_tokens\":24,\"chat_template_kwargs\":{\"enable_thinking\":false}}" \ >/dev/null || { echo "failed at $L"; ok=0; break; } done [ "$ok" = 1 ] && echo "all 20 done" ``` #### Also: setup misreads this GPU's memory `sycl/setup_intel.py` reads 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 --check` on v0.1.43.1, unmodified and with the local patch: | | Unmodified | With the local patch | |---|---|---| | GPU line | `Intel Intel GPU 7d55 (xe), 0.2 GB VRAM` | `Intel Arc Graphics (Meteor Lake-P, shared RAM), 45.8 GB VRAM` | | Warning | "less than 12 GB of VRAM ... most experts stay on the CPU" | none | | IQ2_XS | "fits with part of its experts mirrored in RAM (slower)" | "fits in VRAM" | | IQ3_XXS | "fits with part of its experts mirrored in RAM (slower)" | "does not fit" | With 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. <details><summary>Local patch (2 files, +15 / -3)</summary> ```diff diff --git a/sycl/include/dpct/device.hpp b/sycl/include/dpct/device.hpp index b55d2dcf..8fd8ddcc 100644 --- a/sycl/include/dpct/device.hpp +++ b/sycl/include/dpct/device.hpp @@ -345,6 +345,9 @@ static void get_device_info(device_info &out, const sycl::device &dev) { if (dev.has(sycl::aspect::ext_intel_device_id)) { prop.set_device_id( dev.get_info<sycl::ext::intel::info::device::device_id>()); + // Meteor Lake-P iGPU (PCI 7d55) only: nothing else sets the integrated flag, so device_free_bytes() + // (core/expert_cache.cpp) never took its unified-memory branch and read 0 bytes free on this GPU. + if ((prop.get_device_id() & 0xffffu) == 0x7d55) prop.set_integrated(1); } if (dev.has(sycl::aspect::ext_intel_device_info_uuid)) { prop.set_uuid(dev.get_info<sycl::ext::intel::info::device::uuid>()); diff --git a/sycl/setup_intel.py b/sycl/setup_intel.py index 8c0ed962..9dc2cc76 100644 --- a/sycl/setup_intel.py +++ b/sycl/setup_intel.py @@ -52,6 +52,7 @@ INTEL_ARC = {"e223": ("Arc Pro B70", 32.0), "e221": ("Arc Pro B60", 24.0), "e211 # pinned mirror (--mmap-experts + STRATA_VERIFY_NO_HOST=0 - docs/INTEL.md, "Arc A750"). On xe (the A770) the mirror is # built in chunks past that limit and the A-series uses the ordinary streamed path; see to_sycl(). ALCHEMIST_IDS = frozenset({"56a0", "56a1", "56a2", "56a5", "56a6", "5690"}) +MTL_IGPU = "7d55" # Meteor Lake-P iGPU on xe: no VRAM, the GPU shares the RAM. Only this id takes the changes marked MTL. def intel_gpus(): @@ -75,6 +76,8 @@ def intel_gpus(): if driver != "xe": # i915 without a known Arc id is an integrated GPU continue name = f"Intel GPU {devid} (xe)" + if devid == MTL_IGPU and driver == "xe": # MTL: BAR 2 is a 256 MB aperture, not memory; the GPU can address ~93% of + name, vram = "Arc Graphics (Meteor Lake-P, shared RAM)", max(S.ram_gb() * 0.93 - 12, 0.1) # the RAM, less 12 for the OS if not vram: # resource line 2 (BAR 2) is the VRAM aperture on xe cards try: start, end, _ = (dev / "resource").read_text().splitlines()[2].split() @@ -172,7 +175,8 @@ def to_sycl(cfg: dict, exe: Path, ram: float, keep: dict, vram_gb: float = 0.0, args += ["--kv-resident", "32768"] asked_reserve = flag(args, "--vram-reserve-mib") # setup writes it only when the user gave it drop(args, "--vram-reserve-mib", True) - reserve = asked_reserve or (str(SMALL_RESERVE_MIB) if small_card(vram_gb, driver) else + reserve = asked_reserve or ("2048" if devid == MTL_IGPU else # MTL: what is allocated after the expert cache + str(SMALL_RESERVE_MIB) if small_card(vram_gb, driver) else "1024" if ctx <= 32768 else "2048") alchemist = driver == "i915" or devid in ALCHEMIST_IDS if driver == "i915": @@ -183,7 +187,7 @@ def to_sycl(cfg: dict, exe: Path, ram: float, keep: dict, vram_gb: float = 0.0, args += ["--vram-reserve-mib", reserve] else: args += ["--stream-experts", "--vram-reserve-mib", reserve] - if ctx > 32768 or vram_gb >= 24: # long contexts: 4096-token chunks keep the prompt buffers small; a + if ctx > 32768 or (vram_gb >= 24 and devid != MTL_IGPU): # long contexts: 4096-token chunks keep the prompt buffers small; a drop(args, "--prefill", True) # 24 GB+ card with part of the experts in the RAM mirror streams those args += ["--prefill", "4096"] # over PCIe once per chunk, so fewer, bigger chunks read the prompt # faster (Arc Pro B70, IQ3_S, a 4,095-token prompt: 2,048-token @@ -200,6 +204,11 @@ def to_sycl(cfg: dict, exe: Path, ram: float, keep: dict, vram_gb: float = 0.0, # first launch - "'double' is not supported in ... device", the engine dies on the first request with a # temperature - unless the driver emulates it (docs/INTEL.md) env.update({"IGC_EnableDPEmulation": "1", "OverrideDefaultFP64Settings": "1", "NEOReadDebugKeys": "1"}) + if devid == MTL_IGPU: # MTL, each measured on this machine (notes: strata-issue-meteorlake.md) + env.update({"UR_L0_ENABLE_RELAXED_ALLOCATION_LIMITS": "1", # the 33 GiB expert cache is one allocation; the device maximum is 4 GiB + "STRATA_WINDOW_SYNC": "1", # without it a window never started, after 3 to 5 requests + "STRATA_UMA_HEADROOM_GIB": "12", # the engine's free RAM is MemAvailable less this + "STRATA_MIRROR_MIB": "1024"}) # no big pinned mirror: the cache holds every expert if exe != ROOT / "build-sycl-aot" / "strata": env["STRATA_SYCL_BIN"] = exe.relative_to(ROOT).as_posix() if MOUNT.resolve() != ROOT.parent.resolve(): @@ -250,7 +259,7 @@ def install(argv) -> None: m = msg.split()[0] d = S.MODELS.get(m, {}) shard1 = d.get("download_gb", 0) - 28.8 # all but the per-layer lookup table (read from disk) - room = intel[0]["vram_gb"] - 3 + max(0.0, real_ram - 10) # VRAM, plus a pinned host mirror (or the CPU) + room = intel[0]["vram_gb"] - 3 + (0.0 if intel[0].get("devid") == MTL_IGPU else max(0.0, real_ram - 10)) # VRAM, plus a pinned host mirror (or the CPU); MTL: no mirror msg = (f" {m:8s} ~{shard1:.0f} GB of weights: " + ("fits in VRAM" if shard1 <= intel[0]["vram_gb"] - 1.5 else "fits, the experts the card does not hold are computed on the CPU (slower)" if alch and shard1 <= room else ``` </details> ### 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-38` ### Engine log `sycl-ls` inside the `llama-sycl-b70:stable` container (GPU lines only): ``` [level_zero:gpu][level_zero:0] Intel(R) oneAPI Unified Runtime over Level-Zero, Intel(R) Arc(TM) Graphics 12.71.4 [1.17.39758+10] [opencl:gpu][opencl:1] Intel(R) OpenCL Graphics (integrated), Intel(R) Arc(TM) Graphics OpenCL 3.0 NEO [26.35.39758.10] ``` Attached (username and hostname replaced): - `strata-alloc-fail.log`: bug 2, from the 0.1.43 work - `strata-window-hang.log`: bug 3, from the 0.1.43 work - `strata-start-log.log`: the 11 starts described under "The engine's free memory at start-up depends on `MemAvailable`"
Author
Owner

@qiuzan2001 commented on GitHub (Oct 15, 2026):

For the setup part ("setup misreads this GPU's memory size"), reproduced on Linux with main 296b59d2 using 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 from sycl/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 gets name = "Intel GPU <id> (xe)" (line 77) and then "Intel " + name (line 84). The engine-side bugs need the hardware and were not checked here.

<!-- gh-comment-id:6184427943 --> @qiuzan2001 commented on GitHub (Oct 15, 2026): For the setup part ("setup misreads this GPU's memory size"), reproduced on Linux with main 296b59d2 using 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 from `sycl/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 gets `name = "Intel GPU <id> (xe)"` (line 77) and then `"Intel " + name` (line 84). The engine-side bugs need the hardware and were not checked here.
Author
Owner

@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 include finds only the definition (sycl/include/dpct/device.hpp:201) and no caller, so device_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 MemAvailable doesn'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, MemAvailable was 24.6 GiB. /sys/kernel/debug/ttm/page_pool showed 8,141,284 pages (31.06 GiB) against a limit of 8,141,468 pages (half the RAM, the page_pool_size default). After sync; echo 2 > /proc/sys/vm/drop_caches the pool held 2 pages and MemAvailable was 55.6 GiB. That is a gain of 31.02 GiB, the pool's size, so the pool's shrinker is evidently triggered by drop_caches=2. That is why the drop_caches step in "How to apply the fixes" works. /proc/meminfo showed GPUActive: 807019564 kB (770 GiB) with GPUReclaim: 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, then REFUSED: 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 without drop_caches:

cap pool after a stop MemAvailable after a stop starts
none 31.06 GiB 24.6 GiB refused (12.27 GiB free)
4 GiB (1,048,576 pages) 3.98 GiB 51.7 GiB 36.90 GiB free accepted, then 33.35 GiB free refused
1 GiB (262,144 pages) about 1.0 GiB 54.6 to 54.7 GiB 5 of 5 accepted (4 manual starts, 1 automatic restart; 35.87 to 36.09 GiB free where logged)

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 raised STRATA_MIRROR_MIB from 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 any drop_caches and came up (35.87 GiB free).

I have also made the cap persistent with options ttm page_pool_size=262144 in /etc/modprobe.d/ttm-pool.conf plus update-initramfs -u

Thanks again to you both for the help!

<!-- gh-comment-id:6188200192 --> @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 include` finds only the definition (`sycl/include/dpct/device.hpp:201`) and no caller, so `device_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 `MemAvailable` doesn'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, `MemAvailable` was 24.6 GiB. `/sys/kernel/debug/ttm/page_pool` showed 8,141,284 pages (31.06 GiB) against a limit of 8,141,468 pages (half the RAM, the `page_pool_size` default). After `sync; echo 2 > /proc/sys/vm/drop_caches` the pool held 2 pages and `MemAvailable` was 55.6 GiB. That is a gain of 31.02 GiB, the pool's size, so the pool's shrinker is evidently triggered by `drop_caches=2`. That is why the `drop_caches` step in "How to apply the fixes" works. `/proc/meminfo` showed `GPUActive: 807019564 kB` (770 GiB) with `GPUReclaim: 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`, then `REFUSED: 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 without `drop_caches`: | cap | pool after a stop | MemAvailable after a stop | starts | |---|---|---|---| | none | 31.06 GiB | 24.6 GiB | refused (12.27 GiB free) | | 4 GiB (1,048,576 pages) | 3.98 GiB | 51.7 GiB | 36.90 GiB free accepted, then 33.35 GiB free refused | | 1 GiB (262,144 pages) | about 1.0 GiB | 54.6 to 54.7 GiB | 5 of 5 accepted (4 manual starts, 1 automatic restart; 35.87 to 36.09 GiB free where logged) | 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 raised `STRATA_MIRROR_MIB` from 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 any `drop_caches` and came up (35.87 GiB free). I have also made the cap persistent with `options ttm page_pool_size=262144` in `/etc/modprobe.d/ttm-pool.conf` plus `update-initramfs -u` Thanks again to you both for the help!
Author
Owner

@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:

  1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6270926471 --> @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: 1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Author
Owner

@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 VRAM even with an explicit --expert-cache 12288; 12206 of 12206 experts missing from VRAM mirrored 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 on main (grep -rn set_integrated sycl src include), so device_free_bytes() never reaches its MemAvailable branch 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). The MemAvailable dependency 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.

<!-- gh-comment-id:6342466580 --> @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 VRAM` even with an explicit `--expert-cache 12288`; `12206 of 12206 experts missing from VRAM` mirrored 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 on `main` (`grep -rn set_integrated sycl src include`), so `device_free_bytes()` never reaches its `MemAvailable` branch 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). The `MemAvailable` dependency 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#920
No description provided.