[PR #2079] [Engine] add native Windows support for Intel SYCL GPUs #3847

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

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2079
Author: @lm902
Created: 10/12/2026
Status: 🔄 Open

Base: main ← Head: windows-intel-native


📝 Commits (6)

  • 71db79e Add native Windows support for Intel SYCL GPUs
  • 795acb3 Validate native Windows SYCL backend and runtime dependencies
  • ac9d080 Merge upstream main and resolve Windows Intel setup conflicts
  • 0a2cc38 docs: document native Windows Intel Arc setup
  • 6edb906 [Engine] merge 0.2.0-beta into native Windows SYCL support
  • 00af69d Merge upstream main and resolve Windows support conflicts

📊 Changes

19 files changed (+726 additions, -77 deletions)

View changed files

📝 docs/INTEL_ARC.md (+50 -9)
📝 setup.py (+41 -7)
📝 sycl/CMakeLists.txt (+21 -4)
📝 sycl/include/strata/core/gguf_expert_source.hpp (+2 -2)
📝 sycl/include/strata/sycl_queue.hpp (+5 -3)
📝 sycl/setup_intel.py (+133 -12)
📝 sycl/src/core/gguf_expert_source.cpp (+44 -9)
📝 sycl/src/core/pinned.dp.cpp (+20 -13)
📝 sycl/src/kernels/cuda/verify_kernels.dp.cpp (+2 -2)
📝 sycl/src/kernels/iq_multi_parity.cpp (+3 -3)
📝 sycl/src/kernels/kv_hybrid_parity.cpp (+4 -0)
📝 sycl/src/kernels/qsa_prompt_attn_parity.cpp (+5 -1)
📝 sycl/src/kernels/rope_parity.cpp (+4 -4)
📝 sycl/src/kernels/sampler_parity.cpp (+3 -3)
📝 sycl/src/prefill/prefill.cpp (+7 -0)
📝 sycl/src/program/generate.cpp (+59 -0)
➕ sycl/tools/build_windows.bat (+38 -0)
📝 tools/test_setup_golden.py (+3 -0)
📝 tools/test_setup_sycl.py (+282 -5)

📄 Description

Problem and result

The upstream SYCL source installer rejects Windows, and the engine has build and file interfaces that prevent a native Windows build. This PR enables the existing source installer and SYCL engine on Windows, including device detection, build, model loading and generation. No container is required. Release packaging and desktop-app/Terminal engine distribution are outside this change.

Updated on 2026-10-20: head 00af69d1 merges upstream cbfd5b92, resolving the new documentation and test conflicts without rewriting the published branch.

This updates the existing #2079 and its Windows Level Zero/runtime investigation. The scope remains native Windows support, not a new optimization or a replacement PR.

Approach

  • Reuse the existing installer and engine; add Windows oneAPI build/runtime paths, GPU selection and early Level Zero capability checks.
  • Use overlapped positioned reads, pointer-width file handles and the Windows RAM budget. Do not label an ordinary VirtualAlloc arena as registered GPU host memory.
  • Keep compatibility fixes conditional on Windows. Upstream ESIMD/INT8 kernels, MMQ defaults and the 8192-token prefill recommendation are unchanged. The prefill source delta is seven Windows-conditional lines for calibration-cache directory creation (_mkdir).
  • Add focused setup/compiler regression tests and Windows instructions in docs/INTEL_ARC.md. No user configs, model files, benchmark artifacts or separate GPU image-encoder feature are included.

Validation

2026-10-20, 00af69d1: Windows native all-target build passed (VS 2022 17.14.42, DPC++ 2026.1.1). python -m unittest tools.test_setup_sycl tools.test_setup_golden tools.test_vision_reader: 72 passed. The B70 Level Zero capability probe and ctest --test-dir build-sycl-win --output-on-failure -R "^(esimd_moe_parity|esimd_moe_mode_test|prefill_gdn_parity)$": 3/3 passed. Full suites and performance measurements were not repeated on this merge.

Earlier validation: 2026-10-19, 6edb9062

Tested on Windows 11 Pro for Workstations Insider build 26220, Core i9-13900KF, 64 GB RAM, Arc Pro B70 32 GB (31.159 GiB), graphics driver 32.0.101.9034 / Level Zero driver 1.17.39500+2. Tools: VS 2022 17.14.40, MSVC 14.44, Windows SDK 10.0.26100, DPC++ 2026.1.1, oneMKL 2026.1.0, Python 3.11.9; Release/Ninja, SPIR-V JIT.

Tested tree: d7b1e6c3853440637f57eb35d6d09587e9e4ca02. Engine SHA-256: c989b1466cdb14f08a7d1a354c01143d1fa69c6a0801f2f4dbe8b0f709adc988.

Passed:

  • cmd /d /c sycl\tools\build_windows.bat: all native SYCL targets built, including ESIMD; rebuilt after the final cache-directory fix.
  • python -m unittest tools.test_setup_sycl tools.test_setup_golden: 46/46 passed, including prefill recommendation and MMQ-default regression checks.
  • strata.exe --list-devices with ONEAPI_DEVICE_SELECTOR=level_zero:gpu: B70, PCI ID e223, correct VRAM, Level Zero backend, free-memory and command-graph support.
  • ctest --test-dir build-sycl-win --output-on-failure -R "^(esimd_moe_parity|esimd_moe_mode_test|prefill_gdn_parity)$": 3/3 passed after the final compile fix.
  • IQ3_S: six independent engine starts and all 12 measured requests below completed normally. Each read 4096 input tokens and generated 64 (finish=length, zero cache reuse). Same tested tree, binary, configuration and input hashes across all arms. Device-plan/no-host protections remained enabled; no RAM guard fired.

Failed:

  • Full installer discovery (tools/test_setup*.py): 701 passed, 3 failed, 2 skipped / 706. One parallel-download test observed a duplicate first range; two test_setup_engine_hash.WhatARefusalDoesToTheCaller tests failed on release lookup/refusal behavior. All three reproduced with unmodified upstream setup.py in the same environment.
  • ctest --test-dir build-sycl-win --output-on-failure --timeout 60: 33 passed, 3 failed / 36. Failures: gr_parity (unsupported QFUSE), ple_parity (missing external fixture), s2_expert_grouped_parity (bitwise differences). No kernel, tolerance or exclusion was changed to hide them.
  • A preliminary IQ2_XS capture failed in external-harness shutdown bookkeeping after generation. Its record was retained and excluded; after fixing the harness, the complete four-start sequence was rerun. No IQ3_S session failed or was excluded.

Not run:

  • Image input and desktop-app/Terminal packaging on this revision. The direct-engine tests do not validate those workflows.
  • Controlled quality evaluation, fixed-clock/power characterization or a prefill chunk-size sweep. These measurements do not compare engine versions.

IQ3_S: INT8 prefill on Windows

Same IQ3_S GGUF/pack and binary; --max-context 32768 --kv int8 --prefill 4096 --expert-cache 11500 --stream-experts --vram-reserve-mib 1024 --pool-workers 15 --spec 4 --spec-min-p 0.5 --pcie-frac 0 --adapt-every 0 --conversation-cache-mib 0, MTP enabled, 12 stager threads. Speed projection and persistent SYCL caching were off. All arms shared one test-local INT8 calibration cache.

Start order: A0, B0, C0, C1, B1, A1. A leaves STRATA_PREFILL_MMQ and its alias unset; B sets it to 0; C sets it to auto. This switch was the only intentional arm difference. Each start excluded one full 4096-token/64-output warmup, then measured two full 4096-token requests, temperature 0, 64-output cap. Distinct leading markers prevented prefix reuse; corresponding inputs were identical across arms. Generation/timings used the existing serve.server.StrataEngine and request_timings APIs.

Start MMQ setting Prefill sample 1 (tok/s) Prefill sample 2 (tok/s)
A0 unset/default 459.7 457.4
B0 0 338.2 336.8
C0 auto 453.5 454.0
C1 auto 453.4 452.3
B1 0 340.3 344.5
A1 unset/default 452.2 451.4

Median of four measured samples per arm: default 454.80, off 339.25, auto 453.45 tok/s. Default vs off: +34.06%; explicit auto vs off: +33.66%. Ranges: default 451.4-459.7, off 336.8-344.5, auto 452.3-454.0 tok/s. Logs confirm automatic INT8/fused DPAS in A/C and no enabled INT8 prompt-expert path in B. This is a repeated prefill gain for this Windows workload, not a new optimization introduced by this PR.

For each measured input, default and explicit auto produced identical 64-token outputs in both rounds. Off differed from them starting at output token 4. These runs do not establish quality equivalence or a decode speedup. Expert-cache arguments were fixed, but actual mixed-format residency varied by two slots (12825-12827; 24936-24941 MiB). Minimum available system RAM was 14.65 GiB; the safety threshold was 2 GiB. Clocks and desktop activity were not locked. Startup/warmup times were excluded, including B0's longer startup.

The earlier IQ2_XS 32K-prompt/8192-chunk experiment remains negative: default median 1427.10 vs off 1426.35 tok/s (+0.053%, overlapping ranges). Individual samples in A0/B0/B1/A1 order: default 1433.3/1427.9, off 1430.2/1425.1, off 1424.2/1427.6, default 1421.2/1426.3. It also used 256K capacity and speed projection, unlike this IQ3_S setup. The experiments therefore do not isolate model size as the reason for the different gains.

Raw session JSON, input hashes, output token IDs and logs are retained locally outside the repository. All measured samples are reported above; these are focused Windows validation runs, not a standard/approved benchmark submission.

Limits

The native Windows path requires working Level Zero, GPU free-memory queries and command graphs; OpenCL-only inference is refused before loading the model. The failed checks above remain disclosed. Existing user model/config files and network/authentication settings are unchanged. Upstream performance kernels and defaults are preserved.


🔄 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/2079 **Author:** [@lm902](https://github.com/lm902) **Created:** 10/12/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `windows-intel-native` --- ### 📝 Commits (6) - [`71db79e`](https://github.com/Niko1221/Strata/commit/71db79e02a8d0c72e8fa70f992f8fca6b6a64a90) Add native Windows support for Intel SYCL GPUs - [`795acb3`](https://github.com/Niko1221/Strata/commit/795acb34e5a4c82eff3f698e077932f22be67f65) Validate native Windows SYCL backend and runtime dependencies - [`ac9d080`](https://github.com/Niko1221/Strata/commit/ac9d0800f42585caaef7b94b6b3dd7b33e99ce88) Merge upstream main and resolve Windows Intel setup conflicts - [`0a2cc38`](https://github.com/Niko1221/Strata/commit/0a2cc385a0a5a7e2dfd2dd65a1285bd26f87bc2e) docs: document native Windows Intel Arc setup - [`6edb906`](https://github.com/Niko1221/Strata/commit/6edb90627e1150758f841897f3c76c57fa1231af) [Engine] merge 0.2.0-beta into native Windows SYCL support - [`00af69d`](https://github.com/Niko1221/Strata/commit/00af69d1450d089e60609bba468e7da593c385cb) Merge upstream main and resolve Windows support conflicts ### 📊 Changes **19 files changed** (+726 additions, -77 deletions) <details> <summary>View changed files</summary> 📝 `docs/INTEL_ARC.md` (+50 -9) 📝 `setup.py` (+41 -7) 📝 `sycl/CMakeLists.txt` (+21 -4) 📝 `sycl/include/strata/core/gguf_expert_source.hpp` (+2 -2) 📝 `sycl/include/strata/sycl_queue.hpp` (+5 -3) 📝 `sycl/setup_intel.py` (+133 -12) 📝 `sycl/src/core/gguf_expert_source.cpp` (+44 -9) 📝 `sycl/src/core/pinned.dp.cpp` (+20 -13) 📝 `sycl/src/kernels/cuda/verify_kernels.dp.cpp` (+2 -2) 📝 `sycl/src/kernels/iq_multi_parity.cpp` (+3 -3) 📝 `sycl/src/kernels/kv_hybrid_parity.cpp` (+4 -0) 📝 `sycl/src/kernels/qsa_prompt_attn_parity.cpp` (+5 -1) 📝 `sycl/src/kernels/rope_parity.cpp` (+4 -4) 📝 `sycl/src/kernels/sampler_parity.cpp` (+3 -3) 📝 `sycl/src/prefill/prefill.cpp` (+7 -0) 📝 `sycl/src/program/generate.cpp` (+59 -0) ➕ `sycl/tools/build_windows.bat` (+38 -0) 📝 `tools/test_setup_golden.py` (+3 -0) 📝 `tools/test_setup_sycl.py` (+282 -5) </details> ### 📄 Description ## Problem and result The upstream SYCL source installer rejects Windows, and the engine has build and file interfaces that prevent a native Windows build. This PR enables the existing source installer and SYCL engine on Windows, including device detection, build, model loading and generation. No container is required. Release packaging and desktop-app/Terminal engine distribution are outside this change. Updated on **2026-10-20**: head **00af69d1** merges upstream **cbfd5b92**, resolving the new documentation and test conflicts without rewriting the published branch. ## Related discussion This updates the existing #2079 and its Windows Level Zero/runtime investigation. The scope remains native Windows support, not a new optimization or a replacement PR. ## Approach - Reuse the existing installer and engine; add Windows oneAPI build/runtime paths, GPU selection and early Level Zero capability checks. - Use overlapped positioned reads, pointer-width file handles and the Windows RAM budget. Do not label an ordinary VirtualAlloc arena as registered GPU host memory. - Keep compatibility fixes conditional on Windows. Upstream ESIMD/INT8 kernels, MMQ defaults and the 8192-token prefill recommendation are unchanged. The prefill source delta is seven Windows-conditional lines for calibration-cache directory creation (`_mkdir`). - Add focused setup/compiler regression tests and Windows instructions in `docs/INTEL_ARC.md`. No user configs, model files, benchmark artifacts or separate GPU image-encoder feature are included. ## Validation **2026-10-20, `00af69d1`:** Windows native all-target build passed (VS 2022 17.14.42, DPC++ 2026.1.1). `python -m unittest tools.test_setup_sycl tools.test_setup_golden tools.test_vision_reader`: **72 passed**. The B70 Level Zero capability probe and `ctest --test-dir build-sycl-win --output-on-failure -R "^(esimd_moe_parity|esimd_moe_mode_test|prefill_gdn_parity)$"`: **3/3 passed**. Full suites and performance measurements were not repeated on this merge. ### Earlier validation: 2026-10-19, `6edb9062` Tested on Windows 11 Pro for Workstations Insider build 26220, Core i9-13900KF, 64 GB RAM, Arc Pro B70 32 GB (31.159 GiB), graphics driver 32.0.101.9034 / Level Zero driver 1.17.39500+2. Tools: VS 2022 17.14.40, MSVC 14.44, Windows SDK 10.0.26100, DPC++ 2026.1.1, oneMKL 2026.1.0, Python 3.11.9; Release/Ninja, SPIR-V JIT. Tested tree: `d7b1e6c3853440637f57eb35d6d09587e9e4ca02`. Engine SHA-256: `c989b1466cdb14f08a7d1a354c01143d1fa69c6a0801f2f4dbe8b0f709adc988`. **Passed:** - `cmd /d /c sycl\tools\build_windows.bat`: all native SYCL targets built, including ESIMD; rebuilt after the final cache-directory fix. - `python -m unittest tools.test_setup_sycl tools.test_setup_golden`: **46/46 passed**, including prefill recommendation and MMQ-default regression checks. - `strata.exe --list-devices` with `ONEAPI_DEVICE_SELECTOR=level_zero:gpu`: B70, PCI ID `e223`, correct VRAM, Level Zero backend, free-memory and command-graph support. - `ctest --test-dir build-sycl-win --output-on-failure -R "^(esimd_moe_parity|esimd_moe_mode_test|prefill_gdn_parity)$"`: **3/3 passed** after the final compile fix. - IQ3_S: six independent engine starts and all 12 measured requests below completed normally. Each read 4096 input tokens and generated 64 (`finish=length`, zero cache reuse). Same tested tree, binary, configuration and input hashes across all arms. Device-plan/no-host protections remained enabled; no RAM guard fired. **Failed:** - Full installer discovery (`tools/test_setup*.py`): **701 passed, 3 failed, 2 skipped / 706**. One parallel-download test observed a duplicate first range; two `test_setup_engine_hash.WhatARefusalDoesToTheCaller` tests failed on release lookup/refusal behavior. All three reproduced with unmodified upstream `setup.py` in the same environment. - `ctest --test-dir build-sycl-win --output-on-failure --timeout 60`: **33 passed, 3 failed / 36**. Failures: `gr_parity` (unsupported QFUSE), `ple_parity` (missing external fixture), `s2_expert_grouped_parity` (bitwise differences). No kernel, tolerance or exclusion was changed to hide them. - A preliminary IQ2_XS capture failed in external-harness shutdown bookkeeping after generation. Its record was retained and excluded; after fixing the harness, the complete four-start sequence was rerun. No IQ3_S session failed or was excluded. **Not run:** - Image input and desktop-app/Terminal packaging on this revision. The direct-engine tests do not validate those workflows. - Controlled quality evaluation, fixed-clock/power characterization or a prefill chunk-size sweep. These measurements do not compare engine versions. ### IQ3_S: INT8 prefill on Windows Same IQ3_S GGUF/pack and binary; `--max-context 32768 --kv int8 --prefill 4096 --expert-cache 11500 --stream-experts --vram-reserve-mib 1024 --pool-workers 15 --spec 4 --spec-min-p 0.5 --pcie-frac 0 --adapt-every 0 --conversation-cache-mib 0`, MTP enabled, 12 stager threads. Speed projection and persistent SYCL caching were off. All arms shared one test-local INT8 calibration cache. Start order: **A0, B0, C0, C1, B1, A1**. A leaves `STRATA_PREFILL_MMQ` and its alias unset; B sets it to `0`; C sets it to `auto`. This switch was the only intentional arm difference. Each start excluded one full 4096-token/64-output warmup, then measured two full 4096-token requests, temperature 0, 64-output cap. Distinct leading markers prevented prefix reuse; corresponding inputs were identical across arms. Generation/timings used the existing `serve.server.StrataEngine` and `request_timings` APIs. | Start | MMQ setting | Prefill sample 1 (tok/s) | Prefill sample 2 (tok/s) | | --- | --- | ---: | ---: | | A0 | unset/default | 459.7 | 457.4 | | B0 | `0` | 338.2 | 336.8 | | C0 | `auto` | 453.5 | 454.0 | | C1 | `auto` | 453.4 | 452.3 | | B1 | `0` | 340.3 | 344.5 | | A1 | unset/default | 452.2 | 451.4 | Median of four measured samples per arm: **default 454.80**, **off 339.25**, **auto 453.45 tok/s**. Default vs off: **+34.06%**; explicit auto vs off: **+33.66%**. Ranges: default 451.4-459.7, off 336.8-344.5, auto 452.3-454.0 tok/s. Logs confirm automatic INT8/fused DPAS in A/C and no enabled INT8 prompt-expert path in B. This is a repeated prefill gain for this Windows workload, not a new optimization introduced by this PR. For each measured input, default and explicit auto produced identical 64-token outputs in both rounds. **Off differed from them starting at output token 4.** These runs do not establish quality equivalence or a decode speedup. Expert-cache arguments were fixed, but actual mixed-format residency varied by two slots (12825-12827; 24936-24941 MiB). Minimum available system RAM was 14.65 GiB; the safety threshold was 2 GiB. Clocks and desktop activity were not locked. Startup/warmup times were excluded, including B0's longer startup. The earlier IQ2_XS 32K-prompt/8192-chunk experiment remains negative: default median 1427.10 vs off 1426.35 tok/s (+0.053%, overlapping ranges). Individual samples in A0/B0/B1/A1 order: default 1433.3/1427.9, off 1430.2/1425.1, off 1424.2/1427.6, default 1421.2/1426.3. It also used 256K capacity and speed projection, unlike this IQ3_S setup. The experiments therefore do not isolate model size as the reason for the different gains. Raw session JSON, input hashes, output token IDs and logs are retained locally outside the repository. All measured samples are reported above; these are focused Windows validation runs, not a standard/approved benchmark submission. ## Limits The native Windows path requires working Level Zero, GPU free-memory queries and command graphs; OpenCL-only inference is refused before loading the model. The failed checks above remain disclosed. Existing user model/config files and network/authentication settings are unchanged. Upstream performance kernels and defaults are preserved. --- <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#3847
No description provided.