mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1940] [CLOSED] Add Arc native Windows support #3766
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#3766
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1940
Author: @K8-and-a-half-1000
Created: 10/11/2026
Status: ❌ Closed
Base:
main← Head:intel-windows📝 Commits (1)
d052cf9Add Arc Intel native Windows support📊 Changes
41 files changed (+5952 additions, -841 deletions)
View changed files
📝
README.md(+1 -1)📝
docs/INTEL_ARC.md(+14 -9)➕
docs/INTEL_WINDOWS.md(+228 -0)📝
setup.py(+8 -6)📝
sycl/CMakeLists.txt(+149 -20)📝
sycl/include/dpct/dpct.hpp(+16 -0)➕
sycl/include/strata/core/device.hpp(+127 -0)📝
sycl/include/strata/sycl_doorbell.hpp(+23 -6)➕
sycl/include/strata/sycl_heartbeat.hpp(+31 -0)➕
sycl/include/strata/sycl_mem.hpp(+26 -0)📝
sycl/include/strata/sycl_queue.hpp(+4 -1)➕
sycl/probe/CMakeLists.txt(+19 -0)➕
sycl/probe/README.md(+97 -0)➕
sycl/probe/alloc_probe.cpp(+175 -0)➕
sycl/probe/bw_probe.cpp(+327 -0)➕
sycl/probe/doorbell_probe.cpp(+246 -0)➕
sycl/probe/graph_probe.cpp(+287 -0)➕
sycl/probe/probe_common.hpp(+303 -0)📝
sycl/serve/server_intel.py(+121 -14)📝
sycl/serve/xe_telemetry.py(+296 -4)...and 21 more files
📄 Description
Author's note:
This PR adds support for running Strata on Arc on Windows natively, tested on a Pro B70. No WSL2, no docker.
This work was done over the course of a week in an offshoot project at first, but I've decided to contribute upstream based on the project activity and direction.
In short: I like what I see, so here's a contribution to help support the project.
AI disclaimer
Fable 5.1 ultracode and max used heavily throughout.
I've been critical and culled as many temp files, tools and journey notes that are not relevant for this project.
Summary
The SYCL port builds and runs natively on Windows 11 with the Intel oneAPI compiler (
icx), the Visual Studio BuildTools and the Intel Arc driver. Written for and measured on an Arc Pro B70 (32 GB) dedicated to the model. The Linux
build is unchanged: everything lives in
sycl/under#if defined(_WIN32)or in new Windows scripts.Full description, measurements and open questions:
docs/INTEL_WINDOWS.md.What it adds
sycl\tools\build_windows.batfinds Visual Studio and oneAPI, configuressycl\CMakeLists.txtwithNinja, builds the engine,
strata-deviceand the probes, and packagesengine\with the oneAPI runtime DLLs and aBUILD.json(sycl\tools\package_windows.py). CMake: MSVC-style flags foricx,/Qmkl:sequential, the dynamicCRT, the AVX flags.
sycl\setup_intel.pyandsycl\serve\server_intel.pyon Windows (cards numbered bystrata-device --list-devices, the engine's environment, Sysman telemetry throughctypesinsycl\serve\xe_telemetry.py);setup.pyhands--backend syclover on Windows. Tests without a GPU:tools\test_setup_sycl_windows.py.device.dp.cpp); a chunked VRAM arena that tries one allocationfirst (
core/device.hpp); the DXGI video-memory budget folded into the free-VRAM figure (sycl_mem.hpp); a VRAMheartbeat against WDDM eviction on a card that drives no display (
sycl_heartbeat.hpp);prepare_for_device_copyon the pinned expert arena; overlapped
ReadFilefor--stream-experts; thewindows.hmacros that collide withidentifiers in the kernels (
IN,OUT,near,far,small,hyper) dropped after the dpct headers;_putenv_sin the two parity programs that callsetenv.sycl/probe/): doorbell, allocation, bandwidth and graph probes, each ending in aVERDICTline thatnames the engine setting it decides. All under Strata's MIT license (the two that derived from XeStrata's LGPL files
were rewritten from their descriptions).
report_windows.py(a one-shot bug-report bundle) andbenchy_windows.bat/.py(the Linux port'sbenchy on Windows; not yet run).
What ran
Arc Pro B70, driver 32.0.101.8976, oneAPI 2026.0.0, AOT
bmg-g31, 2026-10-10 and 11: the build (0 errors), theprobes, and Swift 1.5 IQ3_XXS at
--max-context 262144with INT8 KV and 32,768 resident cells, used from qwen-code foran evening: prompts read at 630-890 tok/s, decode 50-76 tok/s, 97-99.3% of the KV block reads from VRAM, 2.1 GiB of
VRAM free with everything loaded. On the 0.1.38 base before this: Coder IQ1_M at 60 tok/s sampled, and Swift served
for several days.
Two things worth knowing upstream
sycl/src/kernels/cuda/qsa_decode_attn.dp.cppis the 0.1.38 migration, kept in place of the 0.1.41 one. The0.1.41 copy adds the opt-in lane-cell scoring variant (
STRATA_ATTN_LANECELL) as a second template parameter ofattn_chunk_kernel. Compiled that way by icx 2026.0.0 forbmg-g31, the INT8 instantiation's batched output isinf and NaN (
qsa_prompt_attn_parity, "vs FP64 old": 78.5 on an output scale of 3.7) while the fp16 instantiationis exact; the 0.1.38 copy, otherwise the same code, measures 2e-6 in both. Since 0.1.41 routes SYCL prompts
through this kernel, every reply on Windows was token 0 until the swap.
kv_stream_paritycannot catch thisclass of defect: it compares the kernel's streamed output with its resident output, both through the same kernel.
Whether the Linux build is affected was not measured.
STRATA_PROMPT_ATTN_XMX=1) measures 2e-3 absolute (5e-4 of scale) on thisWindows build, where
docs/INTEL.mdreports 1e-6 of scale on Linux. Off by default; not understood.Known limits
One card per model on Windows (
--gpus/--layer-splitis refused); images are not wired on Intel; only the Arc ProB70 has run this (other Battlemage cards need
STRATA_SYCL_AOT=bmg-g21or a JIT build); the greedy benchmark and theheartbeat's idle test have not been run. Details in
docs/INTEL_WINDOWS.md, "Known limits and open questions".Extra Notes
On Windows there is a RAM eviction on idle timeout that affects Intel Arc cards, which will happen if the card is not driving any displays. This can be avoided by adding a small heartbeat every 10 seconds to poke the card. Check the heartbeat files for more info.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.