[PR #2433] [Engine] sycl: a pipelined window still on the GPU is polled again, not failed #4040

Open
opened 2026-11-07 15:32:43 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2433
Author: @deriknel
Created: 10/14/2026
Status: 🔄 Open

Base: main ← Head: pr/sycl-pipeline-done-poll


📝 Commits (1)

  • 6d157cd sycl: a pipelined window still on the GPU is polled again, not failed

📊 Changes

1 file changed (+8 additions, -17 deletions)

View changed files

📝 sycl/src/core/verify.cpp (+8 -17)

📄 Description

Problem and result

On the SYCL build, --pipeline-windows 2 fails the first request: Verifier::done() still has dpct's placeholder for CUDA's error check and treats a window that is still running as an error. The request ends with verify: error, and tearing the window down while the GPU still runs it can abort the engine with UR_RESULT_ERROR_UNINITIALIZED. With this change a window still on the GPU is polled again, as the CUDA verifier does, and pipelined requests complete.

#2800 (hotschmoe) reports the same failure on two B70s and is fixed by this change; hotschmoe also re-tested it on 0.2.0-beta (main e88ee39d) in the comment below. No scope agreement needed: a focused fix.

Approach

sycl/src/core/verify.cpp, Verifier::done() only:

  • A query of 1 (still running) returns false without setting err, as the cudaErrorNotReady branch does in src/core/verify.cpp.
  • While it waits, the queue is flushed every 2 ms (ext_oneapi_empty() in place of cudaStreamQuery); the 20 s timeout from #267 stays.
  • The DPCT placeholder comments go. A SYCL error arrives as an exception, which the existing catch handles.

Every caller of done() polls a window started with pl_launch, so the serial loop does not change. The branch still merges cleanly into main.

Validation

Setup for every run: main e88ee39d built for SYCL (AOT bmg-g31, oneAPI 2026.1, Compute Runtime 26.35.39758.10, IGC 2.41.5) in a container; host CachyOS, kernel 7.2.11, xe. 2x Intel Arc Pro B70 32 GB, layer split 26, Swift 1.5 Flash-Next IQ3_S with every expert in VRAM, --max-context 262144, int8 KV, --spec 4 --spec-min-p 0.6, --prefill 4096. Each build has only this PR's commit on top of main. Greedy check: 5 fixed prompts (prose, code, maths, an edit, a story), temperature 0, 400 tokens, thinking off, compared character by character.

Passed:

  • main + this PR, --pipeline-windows 2: bench and greedy requests complete, 0 verify: error lines in the engine log; decode 87.3 / 126.8 tok/s (prose / code).
  • With #2436 as well: a ~148K-token prompt (answer found) and 10 prompts of ~13K tokens (all found), no verify: error, no lost device, no xe reset.
  • ctest on both cards: the same 3 failures as on main (gr_parity, ple_parity, s2_expert_grouped_parity); iq_parity with fixtures, 0 failures.

Failed:

  • main alone with --pipeline-windows 2 (the bug): the first request returns HTTP 400 verify: error; the engine log shows strata serve: verify: error.

Not run:

  • CUDA, HIP and Metal builds: the change is in sycl/ only.
  • Single-card --pipeline-windows.

Limits

With this change alone the pipelined text can fork from the serial loop's; #2436 fixes that and needs this PR to run at all.

We investigated (myself and Claude Opus 5.5 in Claude Code) and I reviewed the findings and ran every test on my two Arc Pro B70s on my CachyOS machine.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/2433 **Author:** [@deriknel](https://github.com/deriknel) **Created:** 10/14/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `pr/sycl-pipeline-done-poll` --- ### 📝 Commits (1) - [`6d157cd`](https://github.com/Niko1221/Strata/commit/6d157cdb07531acaa868e8bafd61b0307752616c) sycl: a pipelined window still on the GPU is polled again, not failed ### 📊 Changes **1 file changed** (+8 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `sycl/src/core/verify.cpp` (+8 -17) </details> ### 📄 Description ## Problem and result On the SYCL build, `--pipeline-windows 2` fails the first request: `Verifier::done()` still has dpct's placeholder for CUDA's error check and treats a window that is still running as an error. The request ends with `verify: error`, and tearing the window down while the GPU still runs it can abort the engine with `UR_RESULT_ERROR_UNINITIALIZED`. With this change a window still on the GPU is polled again, as the CUDA verifier does, and pipelined requests complete. ## Related discussion #2800 (hotschmoe) reports the same failure on two B70s and is fixed by this change; hotschmoe also re-tested it on 0.2.0-beta (`main` e88ee39d) in the comment below. No scope agreement needed: a focused fix. ## Approach `sycl/src/core/verify.cpp`, `Verifier::done()` only: - A query of 1 (still running) returns false without setting `err`, as the `cudaErrorNotReady` branch does in `src/core/verify.cpp`. - While it waits, the queue is flushed every 2 ms (`ext_oneapi_empty()` in place of `cudaStreamQuery`); the 20 s timeout from #267 stays. - The DPCT placeholder comments go. A SYCL error arrives as an exception, which the existing `catch` handles. Every caller of `done()` polls a window started with `pl_launch`, so the serial loop does not change. The branch still merges cleanly into `main`. ## Validation Setup for every run: `main` e88ee39d built for SYCL (AOT `bmg-g31`, oneAPI 2026.1, Compute Runtime 26.35.39758.10, IGC 2.41.5) in a container; host CachyOS, kernel 7.2.11, `xe`. 2x Intel Arc Pro B70 32 GB, layer split 26, Swift 1.5 Flash-Next IQ3_S with every expert in VRAM, `--max-context 262144`, int8 KV, `--spec 4 --spec-min-p 0.6`, `--prefill 4096`. Each build has only this PR's commit on top of `main`. Greedy check: 5 fixed prompts (prose, code, maths, an edit, a story), temperature 0, 400 tokens, thinking off, compared character by character. **Passed:** - `main` + this PR, `--pipeline-windows 2`: bench and greedy requests complete, 0 `verify: error` lines in the engine log; decode 87.3 / 126.8 tok/s (prose / code). - With #2436 as well: a ~148K-token prompt (answer found) and 10 prompts of ~13K tokens (all found), no `verify: error`, no lost device, no `xe` reset. - `ctest` on both cards: the same 3 failures as on `main` (`gr_parity`, `ple_parity`, `s2_expert_grouped_parity`); `iq_parity` with fixtures, 0 failures. **Failed:** - `main` alone with `--pipeline-windows 2` (the bug): the first request returns HTTP 400 `verify: error`; the engine log shows `strata serve: verify: error`. **Not run:** - CUDA, HIP and Metal builds: the change is in `sycl/` only. - Single-card `--pipeline-windows`. ## Limits With this change alone the pipelined text can fork from the serial loop's; #2436 fixes that and needs this PR to run at all. We investigated (myself and Claude Opus 5.5 in Claude Code) and I reviewed the findings and ran every test on my two Arc Pro B70s on my CachyOS machine. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#4040
No description provided.