[GH-ISSUE #867] Intel SYCL port on 2x Arc Pro B60: results, and "never rang (graph finished)" on the host-mirror path #381

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

Originally created by @LocalXPU on GitHub (Oct 5, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/867

A B60 result for the port is already in #423 (one card, Q2_0, a fork with its own experiments, from maxious). This one is two cards, the 0.1.39 port with the release's two build fixes, both IQ-quant models, --layer-split. On one B60 with host-mirrored experts the Coder stopped at layer 15 until a one-line fix (#866). maxious's fork has fixed the same bug in verify.cpp; session.cpp still has it there.

Card: 2x Intel Arc Pro B60 24 GB, PCI 8086:e211, xe driver, Level Zero V2. Ryzen 5 5600, 64 GB DDR4, PCIe 3.0 x8 per card, Ubuntu 24.04, kernel 6.17.

Driver: compute runtime NEO 26.09.37435.12 (intel-opencl-icd, libze-intel-gpu1, intel-ocloc), libze1 1.28.0.

sycl-ls:

[level_zero:gpu][level_zero:0] Intel(R) oneAPI Unified Runtime over Level-Zero V2, Intel(R) Arc(TM) Pro B60 Graphics 20.1.0 [1.14.37435+12]
[level_zero:gpu][level_zero:1] Intel(R) oneAPI Unified Runtime over Level-Zero V2, Intel(R) Arc(TM) Pro B60 Graphics 20.1.0 [1.14.37435+12]
[opencl:gpu][opencl:1] Intel(R) OpenCL Graphics, Intel(R) Arc(TM) Pro B60 Graphics OpenCL 3.0 NEO  [26.09.37435.12]
[opencl:gpu][opencl:2] Intel(R) OpenCL Graphics, Intel(R) Arc(TM) Pro B60 Graphics OpenCL 3.0 NEO  [26.09.37435.12]

oneAPI: DPC++ 2026.1.1 (intel-oneapi-compiler-dpcpp-cpp 2026.1.1-325), oneMKL 2026.1.0, ocloc ids bmg-g21 = 20.1.0. AOT -DSTRATA_SYCL_AOT=bmg-g21, -j4, no Docker.

Engine: 6f32ec0 plus two changes: the compile fix (same as #784 / #809) and the ring-wait fix (#866). Reports 0.1.39-sycl.

Model and flags: Coder IQ1_M and Flash-Next IQ2_XS, served through sycl/serve/server_intel.py. --expert-cache auto --stream-experts --prefill auto --spec 4 --spec-min-p 0.5 --mtp <rt> --max-context 8192 --kv int8 --vram-reserve-mib 1536 --no-prefill-borrow --layer-split 24 (Coder) or 25 (IQ2_XS). Environment: ONEAPI_DEVICE_SELECTOR=level_zero:0,1 SYCL_CACHE_PERSISTENT=0 STRATA_MIRROR_MIB=6144 STRATA_VERIFY_DEVICE_PLAN=1 STRATA_STAGE_TRIM=1 STRATA_VERIFY_NO_HOST=1 (the last only after the log said 100% of the experts resident).

Numbers (server timings, greedy, one request at a time, every expert in VRAM):

decode tok/s prompt tok/s
Coder IQ1_M, 2x B60, short prompt 56.6 (52.8 on the cold first request)
Coder IQ1_M, 2x B60, 1,922 tokens of context, then 2,129 57.2 after the 1.9K context 425 and 428
IQ2_XS, 2x B60, short prompt 58.6 and 61.3
IQ2_XS, 2x B60, 1,922 tokens of context, then 2,129 55.5 after the 1.9K context 445 and 436
Coder IQ1_M, one B60, 4,042 of 12,288 experts mirrored 11.9

Both models answered coding questions correctly (code executed against known outputs) and held a three-turn conversation. Per-request numbers, VRAM per card, configs and engine logs: #866 (bench/results/2026-10-04-community-2x-arc-pro-b60/). Not tested: streaming, tool calls, the Anthropic route, anything beyond 2.2K tokens of context, --layer-split auto.

The bug. On one B60 the Coder stopped at layer 15 on every try with verify: layer 15 never rang (graph finished). The port turned cudaStreamQuery's answer into DPCT_CHECK_ERROR(cs->ext_oneapi_empty()), which is always 0, so any per-layer wait over 2 ms was reported as a finished graph. The all-resident path does not wait per layer, which is why the B70 runs never met it. The fix is #866. A system fence in strata_spin_pause() (#667) made no difference here, before or after.

Still slow, not fixed: with the fix, one B60 and mirrored experts decodes at 11.9 tok/s. The stage table shows about 3.9 ms per layer in wait for rings, and it scales with kSpinMax in sycl/include/strata/sycl_doorbell.hpp (25.1 tok/s at 2,000, 28.4 at 200, same text). The GPU does not seem to see the host's flag store during the spin. I did not try STRATA_VERIFY_COHERENT=1.

Other things I hit:

  • setvars.sh stops at OCL_ICD_FILENAMES: unbound variable in a shell with set -u.
  • setup_intel.py lists the B60 as e221; these cards are e211 (#866).
  • On a --layer-split, the startup warning N experts are neither in VRAM nor mirrored counts the other card's layers, and a 6 GiB pinned mirror is allocated that the split does not use.
  • iq_parity needs fixtures (tools/iq_fixture.py, with PYTHONPATH=third_party/llama.cpp/gguf-py). One run of it did not finish in 300 s on card 0; my timeout killed it and the card did a GT reset (Schedule disable failed to respond, recovered in 14 ms, no reboot). The same binary then passed in under 90 s. #809's note about a pinned-host to pageable-host copy hanging the copy engine may be related; I did not check.
  • ctest on one B60: 21 of 25 pass. The four: iq_parity (fixtures; passes for all 10 formats once they exist), ple_parity (needs the Q2_0 shard), s2_expert_grouped_parity (4 bitwise differences, host-reference check within tolerance), conversation_snapshot_test (munmap_chunk(): invalid pointer, the one #809 reports fixed).
Originally created by @LocalXPU on GitHub (Oct 5, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/867 A B60 result for the port is already in #423 (one card, Q2_0, a fork with its own experiments, from maxious). This one is two cards, the 0.1.39 port with the release's two build fixes, both IQ-quant models, `--layer-split`. On one B60 with host-mirrored experts the Coder stopped at layer 15 until a one-line fix (#866). maxious's fork has fixed the same bug in `verify.cpp`; `session.cpp` still has it there. **Card:** 2x Intel Arc Pro B60 24 GB, PCI `8086:e211`, `xe` driver, Level Zero V2. Ryzen 5 5600, 64 GB DDR4, PCIe 3.0 x8 per card, Ubuntu 24.04, kernel 6.17. **Driver:** compute runtime NEO 26.09.37435.12 (`intel-opencl-icd`, `libze-intel-gpu1`, `intel-ocloc`), `libze1` 1.28.0. **`sycl-ls`:** ``` [level_zero:gpu][level_zero:0] Intel(R) oneAPI Unified Runtime over Level-Zero V2, Intel(R) Arc(TM) Pro B60 Graphics 20.1.0 [1.14.37435+12] [level_zero:gpu][level_zero:1] Intel(R) oneAPI Unified Runtime over Level-Zero V2, Intel(R) Arc(TM) Pro B60 Graphics 20.1.0 [1.14.37435+12] [opencl:gpu][opencl:1] Intel(R) OpenCL Graphics, Intel(R) Arc(TM) Pro B60 Graphics OpenCL 3.0 NEO [26.09.37435.12] [opencl:gpu][opencl:2] Intel(R) OpenCL Graphics, Intel(R) Arc(TM) Pro B60 Graphics OpenCL 3.0 NEO [26.09.37435.12] ``` **oneAPI:** DPC++ 2026.1.1 (`intel-oneapi-compiler-dpcpp-cpp 2026.1.1-325`), oneMKL 2026.1.0, `ocloc ids bmg-g21` = 20.1.0. AOT `-DSTRATA_SYCL_AOT=bmg-g21`, `-j4`, no Docker. **Engine:** `6f32ec0` plus two changes: the compile fix (same as #784 / #809) and the ring-wait fix (#866). Reports `0.1.39-sycl`. **Model and flags:** Coder IQ1_M and Flash-Next IQ2_XS, served through `sycl/serve/server_intel.py`. `--expert-cache auto --stream-experts --prefill auto --spec 4 --spec-min-p 0.5 --mtp <rt> --max-context 8192 --kv int8 --vram-reserve-mib 1536 --no-prefill-borrow --layer-split 24` (Coder) or `25` (IQ2_XS). Environment: `ONEAPI_DEVICE_SELECTOR=level_zero:0,1 SYCL_CACHE_PERSISTENT=0 STRATA_MIRROR_MIB=6144 STRATA_VERIFY_DEVICE_PLAN=1 STRATA_STAGE_TRIM=1 STRATA_VERIFY_NO_HOST=1` (the last only after the log said `100% of the experts resident`). **Numbers** (server `timings`, greedy, one request at a time, every expert in VRAM): | | decode tok/s | prompt tok/s | | --- | --- | --- | | Coder IQ1_M, 2x B60, short prompt | 56.6 (52.8 on the cold first request) | | | Coder IQ1_M, 2x B60, 1,922 tokens of context, then 2,129 | 57.2 after the 1.9K context | 425 and 428 | | IQ2_XS, 2x B60, short prompt | 58.6 and 61.3 | | | IQ2_XS, 2x B60, 1,922 tokens of context, then 2,129 | 55.5 after the 1.9K context | 445 and 436 | | Coder IQ1_M, one B60, 4,042 of 12,288 experts mirrored | 11.9 | | Both models answered coding questions correctly (code executed against known outputs) and held a three-turn conversation. Per-request numbers, VRAM per card, configs and engine logs: #866 (`bench/results/2026-10-04-community-2x-arc-pro-b60/`). Not tested: streaming, tool calls, the Anthropic route, anything beyond 2.2K tokens of context, `--layer-split auto`. **The bug.** On one B60 the Coder stopped at layer 15 on every try with `verify: layer 15 never rang (graph finished)`. The port turned `cudaStreamQuery`'s answer into `DPCT_CHECK_ERROR(cs->ext_oneapi_empty())`, which is always 0, so any per-layer wait over 2 ms was reported as a finished graph. The all-resident path does not wait per layer, which is why the B70 runs never met it. The fix is #866. A system fence in `strata_spin_pause()` (#667) made no difference here, before or after. **Still slow, not fixed:** with the fix, one B60 and mirrored experts decodes at 11.9 tok/s. The stage table shows about 3.9 ms per layer in `wait for rings`, and it scales with `kSpinMax` in `sycl/include/strata/sycl_doorbell.hpp` (25.1 tok/s at 2,000, 28.4 at 200, same text). The GPU does not seem to see the host's flag store during the spin. I did not try `STRATA_VERIFY_COHERENT=1`. **Other things I hit:** - `setvars.sh` stops at `OCL_ICD_FILENAMES: unbound variable` in a shell with `set -u`. - `setup_intel.py` lists the B60 as `e221`; these cards are `e211` (#866). - On a `--layer-split`, the startup warning `N experts are neither in VRAM nor mirrored` counts the other card's layers, and a 6 GiB pinned mirror is allocated that the split does not use. - `iq_parity` needs fixtures (`tools/iq_fixture.py`, with `PYTHONPATH=third_party/llama.cpp/gguf-py`). One run of it did not finish in 300 s on card 0; my timeout killed it and the card did a GT reset (`Schedule disable failed to respond`, recovered in 14 ms, no reboot). The same binary then passed in under 90 s. #809's note about a pinned-host to pageable-host copy hanging the copy engine may be related; I did not check. - `ctest` on one B60: 21 of 25 pass. The four: `iq_parity` (fixtures; passes for all 10 formats once they exist), `ple_parity` (needs the Q2_0 shard), `s2_expert_grouped_parity` (4 bitwise differences, host-reference check within tolerance), `conversation_snapshot_test` (`munmap_chunk(): invalid pointer`, the one #809 reports fixed).
Author
Owner

@maxious commented on GitHub (Oct 5, 2026):

Thanks for reading the fork, and especially for checking session.cpp rather than stopping at the verify.cpp fix — you were right that the bug was still live there.

Confirmed and fixed. session_run_token had the identical defect. DPCT_CHECK_ERROR is not a value-returning wrapper: from sycl/include/dpct/dpct.hpp it evaluates its argument as a statement and returns dpct::success unless the call throws. So

const dpct::err0 q = DPCT_CHECK_ERROR((cs->ext_oneapi_empty()));
if (q != 1 && *seq < want) { /* "never rang (graph finished)" */ }

always saw q == dpct::success: q != 1 was always true, and the emptiness result was never read at all. Two consequences, both matching what you saw — the guard was not a completion gate, and the message always said "graph finished", which was a lie. The host abandoned any layer whose ring took longer than the flush interval (STRATA_TG_FLUSH_US, 2000 µs by default) and the 20 s timeout beneath it never became the real backstop. That is why the layer index moves between runs: it is the first layer whose ring happens to exceed the interval.

The fix, identical in shape to the verify.cpp one (ff93973, branch b70 of this fork):

bool idle = false;
try { idle = cs->ext_oneapi_empty(); }
catch (const std::exception &e) { /* report the fault it is */ }
if (idle && *seq < want) { /* abort, with host seq and want in the message */ }

Only a genuinely idle queue with a ring still missing is an abort now; a thrown exception is reported as itself rather than as "finished"; the message carries host seq/want so the next occurrence is diagnosable; and the 20 s bound stays the backstop. ctest is 29/29 on that binary.

Two notes that may save you time:

  • The canonical write-up is docs/sycl-experiments/19-doorbell-completion-gate.md in the fork — it quotes the macro's definition and gives the measured before/after (decode went from "unable to finish a round" to 17.4 tok/s). graph_audit_test.cpp:125 also asserts the macro's semantics directly, so a future DPCT change that gave it value semantics fails a test instead of silently re-breaking every gate.
  • I swept src/ for the same trap. The only remaining DPCT_CHECK_ERROR(ext_oneapi_empty) uses are two (void) discards that exist purely as submit nudges for WDDM graph submission, where the value was never needed. So this pattern should now be gone from the tree.

What this does not claim. It removes a false abort; it is not a claim about your mirrored-expert ring throughput. The ~3.9 ms/layer wait for rings that scales with kSpinMax is a separate problem — a host flag store the device does not appear to observe during the spin, which is why a strata_spin_pause() fence made no difference. One factual note that may affect your next step: STRATA_VERIFY_COHERENT does not exist in our tree, so it is not available from the fork either.

Your e211 vs e221 finding is noted on our side too — our 2x B60 is the same 8086:e211, and we have no PCI-id table in setup_intel.py; that is worth a separate issue rather than a footnote here.

<!-- gh-comment-id:5992147156 --> @maxious commented on GitHub (Oct 5, 2026): Thanks for reading the fork, and especially for checking `session.cpp` rather than stopping at the `verify.cpp` fix — you were right that the bug was still live there. **Confirmed and fixed.** `session_run_token` had the identical defect. `DPCT_CHECK_ERROR` is not a value-returning wrapper: from `sycl/include/dpct/dpct.hpp` it evaluates its argument as a **statement** and returns `dpct::success` unless the call throws. So ```cpp const dpct::err0 q = DPCT_CHECK_ERROR((cs->ext_oneapi_empty())); if (q != 1 && *seq < want) { /* "never rang (graph finished)" */ } ``` always saw `q == dpct::success`: `q != 1` was **always true**, and the emptiness result was never read at all. Two consequences, both matching what you saw — the guard was not a completion gate, and the message always said `"graph finished"`, which was a lie. The host abandoned any layer whose ring took longer than the flush interval (`STRATA_TG_FLUSH_US`, 2000 µs by default) and the 20 s timeout beneath it never became the real backstop. That is why the layer index moves between runs: it is the first layer whose ring happens to exceed the interval. **The fix**, identical in shape to the `verify.cpp` one (`ff93973`, branch `b70` of this fork): ```cpp bool idle = false; try { idle = cs->ext_oneapi_empty(); } catch (const std::exception &e) { /* report the fault it is */ } if (idle && *seq < want) { /* abort, with host seq and want in the message */ } ``` Only a genuinely idle queue with a ring still missing is an abort now; a thrown exception is reported as itself rather than as "finished"; the message carries `host seq`/`want` so the next occurrence is diagnosable; and the 20 s bound stays the backstop. `ctest` is 29/29 on that binary. Two notes that may save you time: - The canonical write-up is **`docs/sycl-experiments/19-doorbell-completion-gate.md`** in the fork — it quotes the macro's definition and gives the measured before/after (decode went from "unable to finish a round" to 17.4 tok/s). `graph_audit_test.cpp:125` also asserts the macro's semantics directly, so a future DPCT change that gave it value semantics fails a test instead of silently re-breaking every gate. - I swept `src/` for the same trap. The only remaining `DPCT_CHECK_ERROR(ext_oneapi_empty)` uses are two `(void)` discards that exist purely as submit nudges for WDDM graph submission, where the value was never needed. So this pattern should now be gone from the tree. **What this does not claim.** It removes a false abort; it is not a claim about your mirrored-expert ring throughput. The ~3.9 ms/layer `wait for rings` that scales with `kSpinMax` is a separate problem — a host flag store the device does not appear to observe during the spin, which is why a `strata_spin_pause()` fence made no difference. One factual note that may affect your next step: `STRATA_VERIFY_COHERENT` does not exist in our tree, so it is not available from the fork either. Your `e211` vs `e221` finding is noted on our side too — our 2x B60 is the same `8086:e211`, and we have no PCI-id table in `setup_intel.py`; that is worth a separate issue rather than a footnote here.
Author
Owner

@LocalXPU commented on GitHub (Oct 5, 2026):

Thanks for confirming, and for the detail on DPCT_CHECK_ERROR. That explains why the failing layer moved between runs. #866 applies the same fix upstream in both verify.cpp and session.cpp, so once it's merged the port won't need a fork for this. Happy to rerun the 1x B60 host-mirror case against your b70 branch if that's useful.

<!-- gh-comment-id:5993470124 --> @LocalXPU commented on GitHub (Oct 5, 2026): Thanks for confirming, and for the detail on `DPCT_CHECK_ERROR`. That explains why the failing layer moved between runs. #866 applies the same fix upstream in both `verify.cpp` and `session.cpp`, so once it's merged the port won't need a fork for this. Happy to rerun the 1x B60 host-mirror case against your `b70` branch if that's useful.
Author
Owner

@Niko1221 commented on GitHub (Oct 6, 2026):

Fixed in 0.1.40 by #866 together with #784. If a slow ring still stalls on your box, STRATA_VERIFY_COHERENT=1 is worth a try and a log of it is welcome.

<!-- gh-comment-id:6010939544 --> @Niko1221 commented on GitHub (Oct 6, 2026): Fixed in 0.1.40 by #866 together with #784. If a slow ring still stalls on your box, STRATA_VERIFY_COHERENT=1 is worth a try and a log of it is welcome.
Author
Owner

@Niko1221 commented on GitHub (Oct 7, 2026):

The fix is in the code since 0.1.40: the ring waits in verify.cpp and session.cpp no longer rely on cudaStreamQuery, which dpct translated to always return 0. maxious's fork confirms it on the B60. The SYCL engine itself builds again only in 0.1.40.2 (0.1.40 did not build for Intel), so use that release. Closing; thank you for the diagnosis.

<!-- gh-comment-id:6037836835 --> @Niko1221 commented on GitHub (Oct 7, 2026): The fix is in the code since 0.1.40: the ring waits in verify.cpp and session.cpp no longer rely on cudaStreamQuery, which dpct translated to always return 0. maxious's fork confirms it on the B60. The SYCL engine itself builds again only in 0.1.40.2 (0.1.40 did not build for Intel), so use that release. Closing; thank you for the diagnosis.
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#381
No description provided.