mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1552] Native Windows 11 Port for Intel Arc B580 (Strata v0.1.40.4) #620
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#620
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?
Originally created by @xlwang1188 on GitHub (Oct 8, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1552
Native Windows 11 Port for Intel Arc B580 (Strata v0.1.40.4)
Architecture, Source Adaptations, Build Instructions, and Benchmark Report
1. Executive Summary
Upstream Strata v0.1.40.4 officially introduced support for Intel Arc graphics via SYCL, but explicitly noted:
This document provides a comprehensive technical breakdown of our complete port and optimization of Strata v0.1.40.4 running natively on Microsoft Windows 11 with an Intel Arc B580 (12 GB GDDR6, Xe2 Battlemage) GPU.
Key Highlights of This Port
ze_loader.dll) hardware acceleration with Ahead-Of-Time (AOT) compilation targeting Intelbmg-g21.--max-context 262144and--kv-resident 32768(INT8 KV Cache), making it fully capable of running local agentic workflows.strata-vision.exe) utilizingqwen2vlclip weights, with 0 bytes of VRAM overhead, leaving maximum VRAM for resident LLM MoE experts.2. Test Environment & Hardware Specification
bmg-g21), 12 GB GDDR6 (12,706,643,968 bytes)D:\projects\strata\Strata)icx2026.1) + MSVC 19.4x (Visual Studio 2022)3. Upstream Code Differences & Technical Adaptations
To bring upstream Linux-centric SYCL code to Windows 11 MSVC, several major obstacles across header collisions, memory subsystem design, and telemetry were resolved.
3.1 Windows SDK Macro & Header Collisions
When compiling SYCL kernels on Windows using the Intel DPC++ driver (
icxin MSVC-compatible mode), Windows SDK headers (windows.h,minwindef.h,rpcndr.h) inject global macros that break C++ template metaprogramming and standard variables.Macro
OUTandINCollisions:sycl/src/kernels/cuda/verify_kernels.dp.cpp<minwindef.h>defines#define OUTand#define IN. In upstream Strata, speculative verification templates definetemplate <bool OUT>. Under MSVC, this expands totemplate <bool >, triggering compile-time syntax errors.Macro
smallCollision:sycl/src/program/generate.cpp<rpcndr.h>defines#define small char. In upstreamgenerate.cpp,const int64_t small = old_rule()was interpreted asconst int64_t char = old_rule(), breaking compilation.#undef smallguard after system header imports.Missing GNU Extension
memmem:sycl/src/program/generate.cppmemmem()for binary substring searches, but the Microsoft Visual C++ CRT does not.3.2 Host-to-Device Memory Mirroring & Chunking
sycl::malloc_host) causes the Windows Level-Zero runtime to returnnullptr.sycl/src/core/gguf_expert_source.cppinto chunked allocations capped at 4 GiB (kChunkMax = 4ull << 30). Maintained a two-tier pointer index tablemirror_ptr_[(layer * n_expert + expert)]that seamlessly resolves physical expert addresses across chunk boundaries.pread()and POSIXopen()calls with 64-bit Windows file offsets using_lseeki64()and_read().3.3 256K Context Architecture & Expert Slots Allocation
IDXGIAdapter3::QueryVideoMemoryInfo), the engine reliably reserves 2,808 resident expert slots in GPU VRAM (3.78 GiB) on the 12 GB card, up from 2,741 in previous iterations.strata-iq2_xs.json:--max-context 262144--kv-resident 32768(high-speed VRAM resident window)"kv": "int8")3.4 Zero-VRAM Multimodal Vision Integration
build-sycl-aot/strata-vision.execompiled fromtools/vision/strata_vision.cpp."images": trueinserve/server.pyand connected directly to the OpenAI/v1/chat/completionsmultimodal schema.3.5 Real-Time Telemetry Pipeline for Windows
not readable.serve/telemetry.py:ze_loader.dll): Queries PCIe properties (PciSpeed.gen,PciSpeed.width) and engine activity fallbacks.PresentMonAPI2.dll): Dynamic query sampling for GPU temperature, package power, real-time VRAM allocation, and utilization.serve/web/app.js(const gen = hw.gpu_pcie_gen_max || hw.gpu_pcie_gen;), ensuring the real-time PCIe bandwidth, CPU load, and disk read/write sparklines update without JavaScript exceptions.4. Step-by-Step Compilation & Build Guide
Prerequisites
icx,icpx)ocloc,ze_loader.dll)Step 1: Environment Initialization
Launch an x64 Native Tools Command Prompt or set the oneAPI environment variables:
Ensure runtime DLLs (
libhwloc-15.dll,ur_adapter_level_zero.dll) fromC:\Program Files (x86)\Intel\oneAPI\2026.1\binare accessible in the systemPATH.Step 2: Configure & AOT Compile Strata Engine
Run
sycl/build_windows.bator invoke CMake directly:Key Compiler Flags Applied:
/EHsc /O2 /MD /utf-8: Standard MSVC exception handling and runtime linking.-fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend "-device bmg-g21": Targets Intel Xe2 Battlemage explicitly, generating native binary kernels to eliminate runtime JIT pauses.Step 3: Compile Vision Encoder (
strata-vision.exe)Step 4: Verification of Build Artifacts
Ensure the following binaries exist in
build-sycl-aot\:strata.exe(~73.6 MB)strata-vision.exe(~12.4 MB)5. Preliminary Benchmark & Performance Results
5.1 Test Methodology
Testing was conducted on the live server using
qwen3.8-flash-next-iq2_xswith speculative decoding enabled (--spec 6 --mtp-max 4 --lookup 3). Metrics were gathered directly from/metricsand the hardware telemetry pipeline.5.2 Benchmark Results Table
5.3 Comparative Analysis
6. Runtime Configuration & Startup
The engine is managed via configuration file
strata-iq2_xs.json:To start the server, execute
START-IQ2_XS.bator:http://127.0.0.1:8080/http://127.0.0.1:8080/v1/chat/completionshttp://127.0.0.1:8080/v1/messages7. Conclusion
This port proves that the Intel Arc B580 (12 GB, $250 class) can run flagship 125B MoE models natively on Windows 11 with full 256K context and multimodal vision at 18 ~ 21 tokens/second. By eliminating the Linux/WSL2 requirement and resolving Windows SDK macro and memory constraints, the implementation offers a turnkey, production-ready local AI serving solution.
@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.
@Sciencetastic commented on GitHub (Oct 28, 2026):
A second native Windows report, on the current engine and on two cards, with a public branch.
Branch: https://github.com/Sciencetastic/Strata_Windows_IntelB60/tree/windows-sycl (four commits on top of
5e8a4cca, 0.2.7 / engine 0.1.52)Environment: 2x Arc Pro B60 24 GB, Windows 11, Arc driver 32.0.101.8976, Intel oneAPI 2026.1 (DPC++ + oneMKL), Visual Studio 2026, Ryzen 5 5600, 128 GB RAM, B550 board (the two cards probe 0.8 and 13.9 GB/s host-to-device). AOT
bmg-g21, no WSL or Docker.Model: Qwen3.8-Flash-Next IQ2_XS (ISTA-DASLab) with the MTP draft layer,
--layer-split 28, every expert in VRAM.--kv-resident 32768Pictures with the CPU reader (strata-vision.exe, MSVC): a red circle / blue square / "STRATA 42" test image described correctly (text read as "STRATA42"), 7.5 s for the request.
Kernel parity tests on one B60 (JIT build with
-DSTRATA_XMX_SG16=1): 46 of 51 pass.ple_parityneeds a model fixture,iq_parity/iq_parity_fixturesskip without theirs,s2_expert_grouped_parityshows the same 4 bitwise differences (host reference within tolerance) as the Linux 2x B60 report of 2026-10-04, andgr_parityfails in the opt-inSTRATA_QFUSEpath.conversation_snapshot_test, which aborted in that Linux report, passes here.What is in the branch
if(WIN32)/#if defined(_WIN32)(the same macro collisions as above, handled once in a force-includedwin_compat.hppwhere possible):/fp:precise,/Qmkl:sequentialand/W3for icx's MSVC driver;preadas a positionedReadFile; and inpinned.dp.cppthe Windows pinned-memory budget, which took the device LUID fromcudaGetDevicePropertiesin a_WIN32branch DPCT never migrated, now gets it fromsycl::ext::intel::info::device::luid.sycl/tools/win-env.bat(Visual Studio via vswhere, oneAPI viaONEAPI_ROOT),win-build.bat,win-build-tests.bat,win-build-vision.bat,win_prepare.py(setup.py's own download / pack / MTP steps) andsycl/serve/strata-sycl.bat(the twin of strata-sycl.sh, no container).--layer-split, a prompt longer than one chunk stopped dead in its second chunk: a different layer each time (11, 14, 19, 30), 0 layers served, the host idle, until the server's watchdog restarted the engine. Not the copy engine (STRATA_COPY_ENGINE=0), not the int8 prompt experts (STRATA_PREFILL_MMQ=0), not a TDR. It goes away when stage 0 waits for stage 1 after handing it a chunk (thestd::asyncinPrefill::run_impl): same binary, 1,430 tokens in 512-token chunks,STRATA_SPLIT_SERIAL=0stalls in the third chunk and=1passes; with the wait, 2,100 tokens in five chunks read at 445 tok/s. In the branch the wait is the default on Windows only (=0turns it off; Linux unchanged,=1turns it on there). I do not know the cause.Not run: a Linux build of these changes (they are Windows-only blocks, but
sycl/CMakeLists.txtis shared); CUDA and HIP builds (nothing outsidesycl/anddocs/changed); any other card, a single card, Alchemist, the GPU picture reader, setup or the desktop app on Windows.@Niko1221: would you take a native Windows path for the Intel engine? If so I can send it as separate PRs: (1) the Windows build of the SYCL port with the scripts and docs, (2) the layer-split prompt serialization, (3) the Windows run path, (4) a benchmark report. @xlwang1188: your single-card findings (the 4 GiB host allocation limit, the DXGI VRAM query, telemetry) would fit alongside this if you want to combine them.
I prepared this with an AI assistant; I have reviewed the changes and can answer questions about them.
@xlwang1188 commented on GitHub (Oct 28, 2026):
Hi @Sciencetastic, @Niko1221 —
Great work on the 2x Arc Pro B60 native Windows report and finding the
--layer-splitmulti-chunk stall workaround (STRATA_SPLIT_SERIAL=1)!We have just rebased our single-card Intel Arc B580 (12 GB) native Windows 11 port onto
0.2.7(5e8a4cc, engine0.1.52) and integrated yoursycl::ext::intel::info::device::luidandSTRATA_SPLIT_SERIALpatches. Building on yourluididea, we also completed a few new additions for single-card 12 GB setups and Windows telemetry:STRATA_ROUTE_PRIOR(sycl/src/kernels/cuda/route_prior.dp.cpp):0.2.7added residency-biased routing (STRATA_ROUTE_PRIOR=1.5default on<= 13 GiBcards) on CUDA/HIP, which was still a no-op stub on SYCL.add_resident_route_priorto SYCL and wired it intosycl/src/core/verify.cpp. On a single Arc B580 12 GB (IQ3_XXS,--expert-cache auto-> 2,760 resident slots in 4.52 GiB VRAM, 22,092 experts mirrored in 35.89 GiB pinned RAM over PCIe Gen4 x8, MTP draft layer enabled), this brings a massive decode speedup:STRATA_ROUTE_PRIOR=0: 17.21 tok/s (CPU pool wait43.2 ms/round)STRATA_ROUTE_PRIOR=1.5(default): 31.30 tok/s (+81.9%, CPU pool wait drops to19.6 ms/round)sycl/include/dpct/device.hpp):sycl::aspect::ext_intel_free_memoryis unsupported on the Windows Level Zero driver,dpct::device_ext::get_memory_infonow usessycl::ext::intel::info::device::luid+IDXGIFactory4::EnumAdapterByLuid+IDXGIAdapter3::QueryVideoMemoryInfoso--expert-cache autoaccurately sizes the VRAM cache per card on both single- and multi-GPU Windows systems.serve/telemetry.py):zeDeviceGetProperties+ze_device_luid_ext_properties_t(stype=0x0001000d) for device name and hardware LUID (~43 ms init) coupled with DXGIAdapterLuidmatching forDedicatedVideoMemory;zesPowerGetLimitsExtfor real firmware sustained TDP (190.0 Won B580);ZES_ENGINE_GROUP_COPY_ALL,zesEngineGetActivity) + WDDMD3DKMTQueryStatistics(PagingTransferby LUID) for real PCIe/DMA throughput alongside PresentMon dynamic sensors.I'd be very happy to combine our single-card 12 GB patches (chunked host USM mirror, LUID-matched DXGI
get_memory_info,route_prior.dp.cpp, and Windows Intel telemetry) with your PR series! Let me know how you'd like to coordinate the commits.