[GH-ISSUE #1552] Native Windows 11 Port for Intel Arc B580 (Strata v0.1.40.4) #620

Closed
opened 2026-11-04 01:44:34 +07:00 by bsakaguchi · 3 comments
Owner

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:

"Intel Arc is Linux only for now."

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

  1. 100% Native Windows Execution: No Docker, WSL2, or Linux VM required. Direct Level-Zero (ze_loader.dll) hardware acceleration with Ahead-Of-Time (AOT) compilation targeting Intel bmg-g21.
  2. 256K Context Window: Configured with --max-context 262144 and --kv-resident 32768 (INT8 KV Cache), making it fully capable of running local agentic workflows.
  3. Multimodal Vision Integration: Native CPU-based image encoder (strata-vision.exe) utilizing qwen2vl clip weights, with 0 bytes of VRAM overhead, leaving maximum VRAM for resident LLM MoE experts.
  4. Native Hardware Telemetry: Live PCIe bandwidth, GPU load, VRAM, board temperature, and CPU/Disk I/O monitoring using Intel PresentMon Service and Level-Zero APIs.
  5. Production Performance:
    • Standard dialogue decoding: 21.0 tok/s (Expert Cache Hit Rate: 75.8%, MTP Speculation Acceptance: 84.8%).
    • Extreme Long-Context Stress Test: 74,213 prompt tokens + 3,649 output tokens sustained for 237 seconds at 17.8 tok/s (Zero memory leaks or degradations).

2. Test Environment & Hardware Specification

Component Specification
Operating System Windows 11 Pro 64-bit (Build 24H2 / 26H2, WDDM 3.2)
GPU Intel Arc B580 (Xe2 Battlemage, bmg-g21), 12 GB GDDR6 (12,706,643,968 bytes)
Host CPU AMD Ryzen 5 5600 (6 Cores / 12 Threads, Zen 3, AVX2 enabled)
System Memory 64 GB DDR4-3200 (Dual Channel, pinned USM mirror pool ~39 GB)
Storage 1 TB NVMe PCIe 4.0 SSD (D:\projects\strata\Strata)
GPU Driver Intel Arc Software & Drivers (Level-Zero / OpenCL 32.0.101.8991)
Compiler / SDK Intel oneAPI Base Toolkit (DPC++ / icx 2026.1) + MSVC 19.4x (Visual Studio 2022)
Model Qwen 3.8-Flash-Next (125B MoE, IQ2_XS quantization, 24,614 total experts, 48 layers)

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 (icx in MSVC-compatible mode), Windows SDK headers (windows.h, minwindef.h, rpcndr.h) inject global macros that break C++ template metaprogramming and standard variables.

  • Macro OUT and IN Collisions:

    • Location: sycl/src/kernels/cuda/verify_kernels.dp.cpp
    • Problem: Windows <minwindef.h> defines #define OUT and #define IN. In upstream Strata, speculative verification templates define template <bool OUT>. Under MSVC, this expands to template <bool >, triggering compile-time syntax errors.
    • Fix: Injected explicit macro guards before kernel template declarations:
      #ifdef OUT
      #undef OUT
      #endif
      #ifdef IN
      #undef IN
      #endif
      
  • Macro small Collision:

    • Location: sycl/src/program/generate.cpp
    • Problem: Windows RPC header <rpcndr.h> defines #define small char. In upstream generate.cpp, const int64_t small = old_rule() was interpreted as const int64_t char = old_rule(), breaking compilation.
    • Fix: Added #undef small guard after system header imports.
  • Missing GNU Extension memmem:

    • Location: sycl/src/program/generate.cpp
    • Problem: Linux glibc provides memmem() for binary substring searches, but the Microsoft Visual C++ CRT does not.
    • Fix: Implemented an inline Windows fallback:
      #if defined(_WIN32)
      static const void* memmem_win(const void* haystack, size_t haystacklen,
                                    const void* needle, size_t needlelen) {
          if (needlelen == 0) return haystack;
          if (haystacklen < needlelen) return nullptr;
          const char* h = static_cast<const char*>(haystack);
          const char* n = static_cast<const char*>(needle);
          for (size_t i = 0; i <= haystacklen - needlelen; ++i) {
              if (h[i] == n[0] && std::memcmp(h + i, n, needlelen) == 0) {
                  return h + i;
              }
          }
          return nullptr;
      }
      #define memmem memmem_win
      #endif
      

3.2 Host-to-Device Memory Mirroring & Chunking

  • 4 GiB Single Allocation Limitation on Windows WDDM:
    • Problem: Although the Intel Arc B580 has 12 GB of VRAM and the system has 64 GB of RAM, attempting to allocate the entire ~39 GB cold-expert mirror as a single contiguous USM host buffer (sycl::malloc_host) causes the Windows Level-Zero runtime to return nullptr.
    • Fix: Refactored the host memory mirror in sycl/src/core/gguf_expert_source.cpp into chunked allocations capped at 4 GiB (kChunkMax = 4ull << 30). Maintained a two-tier pointer index table mirror_ptr_[(layer * n_expert + expert)] that seamlessly resolves physical expert addresses across chunk boundaries.
  • Direct File I/O Mapping:
    • Replaced Linux-specific pread() and POSIX open() calls with 64-bit Windows file offsets using _lseeki64() and _read().

3.3 256K Context Architecture & Expert Slots Allocation

  • Expert Slots Expansion:
    • Upstream v0.1.40.4 optimized SYCL memory pool alignment. Combined with our DXGI dedicated VRAM query (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.
  • 256K Context Configuration:
    • Configured in strata-iq2_xs.json:
      • --max-context 262144
      • --kv-resident 32768 (high-speed VRAM resident window)
      • INT8 quantized KV cache ("kv": "int8")
      • Dynamic host streaming for the remainder of the 256K token context.

3.4 Zero-VRAM Multimodal Vision Integration

  • Challenge: Standard vision LLM architectures allocate 2 to 4 GB of GPU VRAM for the vision transformer encoder (ViT/CLIP), which would catastrophically starve the 12 GB GPU, shrinking resident MoE experts and destroying decode throughput.
  • Solution:
    • Built an independent native CLI encoder: build-sycl-aot/strata-vision.exe compiled from tools/vision/strata_vision.cpp.
    • Uses AVX2 multi-threaded CPU execution to encode input images and project them into textual token embeddings.
    • Runs in ~8.0 seconds per image on the 6-core Ryzen 5 5600 with 0 bytes of GPU VRAM consumed.
    • Enabled "images": true in serve/server.py and connected directly to the OpenAI /v1/chat/completions multimodal schema.

3.5 Real-Time Telemetry Pipeline for Windows

  • Upstream Strata supported NVML (NVIDIA) and Linux sysfs (AMD). For Intel GPUs on Windows, it showed not readable.
  • Implemented native Windows dual-engine telemetry in serve/telemetry.py:
    1. Intel Level-Zero Loader (ze_loader.dll): Queries PCIe properties (PciSpeed.gen, PciSpeed.width) and engine activity fallbacks.
    2. Intel PresentMon Shared Service (PresentMonAPI2.dll): Dynamic query sampling for GPU temperature, package power, real-time VRAM allocation, and utilization.
    3. Frontend Dashboard Fix: Resolved a variable scoping omission in 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

  1. Windows 11 (64-bit)
  2. Microsoft Visual Studio 2022 (Desktop development with C++, MSVC v143, Windows 11 SDK)
  3. Intel oneAPI Base Toolkit 2026.1:
    • Intel oneAPI DPC++/C++ Compiler (icx, icpx)
    • Intel oneAPI Math Kernel Library (oneMKL)
    • Intel Graphics Compute Runtime (ocloc, ze_loader.dll)
  4. Ninja Build Tool & CMake 3.26+

Step 1: Environment Initialization

Launch an x64 Native Tools Command Prompt or set the oneAPI environment variables:

call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"

Ensure runtime DLLs (libhwloc-15.dll, ur_adapter_level_zero.dll) from C:\Program Files (x86)\Intel\oneAPI\2026.1\bin are accessible in the system PATH.

Step 2: Configure & AOT Compile Strata Engine

Run sycl/build_windows.bat or invoke CMake directly:

cmake -S sycl -B build-sycl-aot -G Ninja ^
  -DCMAKE_BUILD_TYPE=Release ^
  -DCMAKE_C_COMPILER=icx ^
  -DCMAKE_CXX_COMPILER=icx ^
  -DSTRATA_SYCL_AOT=bmg-g21 ^
  -DSTRATA_SYCL_PARITY=OFF

cmake --build build-sycl-aot --target strata --config Release

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)

cmake -S tools/vision -B build-vision -G Ninja ^
  -DCMAKE_BUILD_TYPE=Release ^
  -DCMAKE_CXX_COMPILER=cl
cmake --build build-vision --config Release
copy build-vision\strata_vision.exe build-sycl-aot\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_xs with speculative decoding enabled (--spec 6 --mtp-max 4 --lookup 3). Metrics were gathered directly from /metrics and the hardware telemetry pipeline.

5.2 Benchmark Results Table

Workload Scenario Context (Prompt / Output) Decode Speed Cache Hit Rate MTP Acceptance Observations
Short Dialogue 81 prompt / 100 out 21.0 tok/s 75.8% 84.8% (67/79) Snappy interactive chat; instant time-to-first-token.
Medium Context 59,272 prompt / 98 out 20.4 tok/s 74.0% 85.0% (68/80) KV cache remains responsive over PCIe streaming.
Heavy Stress Test 74,213 prompt / 3,649 out 17.8 tok/s 66.2% 68.6% (1892/2757) 237.7 seconds continuous generation. Zero memory leaks, steady 60°C GPU temp.
Multimodal Vision 1 synthetic test image ~8.01s total N/A N/A CPU inference; 0 MB VRAM consumed; exact shape/color recognition.

5.3 Comparative Analysis

xychart-beta
    title "Decode Speed Comparison (tokens/second)"
    x-axis ["llama.cpp / Ollama (Offload)", "Strata v0.1.3x (Initial Win11)", "Strata v0.1.40.4 (Optimized Win11)"]
    y-axis "Tokens / Second" 0 --> 25
    bar [2.5, 17.1, 21.0]
  1. Versus llama.cpp / Ollama:
    • Running a 125B parameter MoE model on a 12 GB GPU with standard llama.cpp requires offloading 36+ layers to the CPU, yielding 1.5 ~ 3.0 tok/s.
    • Strata achieves 21.0 tok/s, representing an 8x to 10x speedup on identical hardware.
  2. Versus Pre-Upgrade Strata (v0.1.3x):
    • Decode speed increased from ~17.1 tok/s to 21.0 tok/s (+22.8% speedup).
    • Cache hit rate improved from ~62.5% to 75.8%, driven by the expansion to 2,808 resident VRAM expert slots (+67 slots).
    • Under heavy 74K token long-context load, v0.1.40.4 maintained 17.8 tok/s without degradation.

6. Runtime Configuration & Startup

The engine is managed via configuration file strata-iq2_xs.json:

{
  "engine": "build-sycl-aot/strata.exe",
  "vision_encoder": "build-sycl-aot/strata-vision.exe",
  "model": "qwen3.8-flash-next-iq2_xs",
  "args": [
    "--max-context", "262144",
    "--kv-resident", "32768",
    "--kv", "int8",
    "--stream-experts",
    "--expert-cache", "2808",
    "--resident-pinned",
    "--spec", "6",
    "--mtp-max", "4",
    "--lookup", "3"
  ]
}

To start the server, execute START-IQ2_XS.bat or:

python serve/server.py --engine strata --config strata-iq2_xs.json --port 8080
  • Web UI: http://127.0.0.1:8080/
  • OpenAI API: http://127.0.0.1:8080/v1/chat/completions
  • Anthropic API: http://127.0.0.1:8080/v1/messages

7. 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.

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: > *"Intel Arc is Linux only for now."* 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 1. **100% Native Windows Execution**: No Docker, WSL2, or Linux VM required. Direct Level-Zero (`ze_loader.dll`) hardware acceleration with Ahead-Of-Time (AOT) compilation targeting Intel `bmg-g21`. 2. **256K Context Window**: Configured with `--max-context 262144` and `--kv-resident 32768` (INT8 KV Cache), making it fully capable of running local agentic workflows. 3. **Multimodal Vision Integration**: Native CPU-based image encoder (`strata-vision.exe`) utilizing `qwen2vl` clip weights, with **0 bytes of VRAM overhead**, leaving maximum VRAM for resident LLM MoE experts. 4. **Native Hardware Telemetry**: Live PCIe bandwidth, GPU load, VRAM, board temperature, and CPU/Disk I/O monitoring using Intel PresentMon Service and Level-Zero APIs. 5. **Production Performance**: - Standard dialogue decoding: **21.0 tok/s** (Expert Cache Hit Rate: **75.8%**, MTP Speculation Acceptance: **84.8%**). - Extreme Long-Context Stress Test: **74,213 prompt tokens + 3,649 output tokens** sustained for **237 seconds** at **17.8 tok/s** (Zero memory leaks or degradations). --- ## 2. Test Environment & Hardware Specification | Component | Specification | | :--- | :--- | | **Operating System** | Windows 11 Pro 64-bit (Build 24H2 / 26H2, WDDM 3.2) | | **GPU** | Intel Arc B580 (Xe2 Battlemage, `bmg-g21`), 12 GB GDDR6 (12,706,643,968 bytes) | | **Host CPU** | AMD Ryzen 5 5600 (6 Cores / 12 Threads, Zen 3, AVX2 enabled) | | **System Memory** | 64 GB DDR4-3200 (Dual Channel, pinned USM mirror pool ~39 GB) | | **Storage** | 1 TB NVMe PCIe 4.0 SSD (`D:\projects\strata\Strata`) | | **GPU Driver** | Intel Arc Software & Drivers (Level-Zero / OpenCL 32.0.101.8991) | | **Compiler / SDK** | Intel oneAPI Base Toolkit (DPC++ / `icx` 2026.1) + MSVC 19.4x (Visual Studio 2022) | | **Model** | Qwen 3.8-Flash-Next (125B MoE, IQ2_XS quantization, 24,614 total experts, 48 layers) | --- ## 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 (`icx` in MSVC-compatible mode), Windows SDK headers (`windows.h`, `minwindef.h`, `rpcndr.h`) inject global macros that break C++ template metaprogramming and standard variables. * **Macro `OUT` and `IN` Collisions**: - *Location*: [`sycl/src/kernels/cuda/verify_kernels.dp.cpp`](file:///D:/projects/strata/Strata/sycl/src/kernels/cuda/verify_kernels.dp.cpp) - *Problem*: Windows `<minwindef.h>` defines `#define OUT` and `#define IN`. In upstream Strata, speculative verification templates define `template <bool OUT>`. Under MSVC, this expands to `template <bool >`, triggering compile-time syntax errors. - *Fix*: Injected explicit macro guards before kernel template declarations: ```cpp #ifdef OUT #undef OUT #endif #ifdef IN #undef IN #endif ``` * **Macro `small` Collision**: - *Location*: [`sycl/src/program/generate.cpp`](file:///D:/projects/strata/Strata/sycl/src/program/generate.cpp) - *Problem*: Windows RPC header `<rpcndr.h>` defines `#define small char`. In upstream `generate.cpp`, `const int64_t small = old_rule()` was interpreted as `const int64_t char = old_rule()`, breaking compilation. - *Fix*: Added `#undef small` guard after system header imports. * **Missing GNU Extension `memmem`**: - *Location*: [`sycl/src/program/generate.cpp`](file:///D:/projects/strata/Strata/sycl/src/program/generate.cpp) - *Problem*: Linux glibc provides `memmem()` for binary substring searches, but the Microsoft Visual C++ CRT does not. - *Fix*: Implemented an inline Windows fallback: ```cpp #if defined(_WIN32) static const void* memmem_win(const void* haystack, size_t haystacklen, const void* needle, size_t needlelen) { if (needlelen == 0) return haystack; if (haystacklen < needlelen) return nullptr; const char* h = static_cast<const char*>(haystack); const char* n = static_cast<const char*>(needle); for (size_t i = 0; i <= haystacklen - needlelen; ++i) { if (h[i] == n[0] && std::memcmp(h + i, n, needlelen) == 0) { return h + i; } } return nullptr; } #define memmem memmem_win #endif ``` --- ### 3.2 Host-to-Device Memory Mirroring & Chunking * **4 GiB Single Allocation Limitation on Windows WDDM**: - *Problem*: Although the Intel Arc B580 has 12 GB of VRAM and the system has 64 GB of RAM, attempting to allocate the entire ~39 GB cold-expert mirror as a single contiguous USM host buffer (`sycl::malloc_host`) causes the Windows Level-Zero runtime to return `nullptr`. - *Fix*: Refactored the host memory mirror in [`sycl/src/core/gguf_expert_source.cpp`](file:///D:/projects/strata/Strata/sycl/src/core/gguf_expert_source.cpp) into chunked allocations capped at 4 GiB (`kChunkMax = 4ull << 30`). Maintained a two-tier pointer index table `mirror_ptr_[(layer * n_expert + expert)]` that seamlessly resolves physical expert addresses across chunk boundaries. * **Direct File I/O Mapping**: - Replaced Linux-specific `pread()` and POSIX `open()` calls with 64-bit Windows file offsets using `_lseeki64()` and `_read()`. --- ### 3.3 256K Context Architecture & Expert Slots Allocation * **Expert Slots Expansion**: - Upstream v0.1.40.4 optimized SYCL memory pool alignment. Combined with our DXGI dedicated VRAM query (`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. * **256K Context Configuration**: - Configured in [`strata-iq2_xs.json`](file:///D:/projects/strata/Strata/strata-iq2_xs.json): - `--max-context 262144` - `--kv-resident 32768` (high-speed VRAM resident window) - INT8 quantized KV cache (`"kv": "int8"`) - Dynamic host streaming for the remainder of the 256K token context. --- ### 3.4 Zero-VRAM Multimodal Vision Integration * **Challenge**: Standard vision LLM architectures allocate 2 to 4 GB of GPU VRAM for the vision transformer encoder (ViT/CLIP), which would catastrophically starve the 12 GB GPU, shrinking resident MoE experts and destroying decode throughput. * **Solution**: - Built an independent native CLI encoder: [`build-sycl-aot/strata-vision.exe`](file:///D:/projects/strata/Strata/build-sycl-aot/strata-vision.exe) compiled from [`tools/vision/strata_vision.cpp`](file:///D:/projects/strata/Strata/tools/vision/strata_vision.cpp). - Uses AVX2 multi-threaded CPU execution to encode input images and project them into textual token embeddings. - Runs in **~8.0 seconds** per image on the 6-core Ryzen 5 5600 with **0 bytes of GPU VRAM consumed**. - Enabled `"images": true` in `serve/server.py` and connected directly to the OpenAI `/v1/chat/completions` multimodal schema. --- ### 3.5 Real-Time Telemetry Pipeline for Windows * Upstream Strata supported NVML (NVIDIA) and Linux sysfs (AMD). For Intel GPUs on Windows, it showed `not readable`. * Implemented native Windows dual-engine telemetry in [`serve/telemetry.py`](file:///D:/projects/strata/Strata/serve/telemetry.py): 1. **Intel Level-Zero Loader (`ze_loader.dll`)**: Queries PCIe properties (`PciSpeed.gen`, `PciSpeed.width`) and engine activity fallbacks. 2. **Intel PresentMon Shared Service (`PresentMonAPI2.dll`)**: Dynamic query sampling for GPU temperature, package power, real-time VRAM allocation, and utilization. 3. **Frontend Dashboard Fix**: Resolved a variable scoping omission in [`serve/web/app.js`](file:///D:/projects/strata/Strata/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 1. **Windows 11 (64-bit)** 2. **Microsoft Visual Studio 2022** (Desktop development with C++, MSVC v143, Windows 11 SDK) 3. **Intel oneAPI Base Toolkit 2026.1**: - Intel oneAPI DPC++/C++ Compiler (`icx`, `icpx`) - Intel oneAPI Math Kernel Library (oneMKL) - Intel Graphics Compute Runtime (`ocloc`, `ze_loader.dll`) 4. **Ninja Build Tool & CMake 3.26+** ### Step 1: Environment Initialization Launch an x64 Native Tools Command Prompt or set the oneAPI environment variables: ```cmd call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" ``` Ensure runtime DLLs (`libhwloc-15.dll`, `ur_adapter_level_zero.dll`) from `C:\Program Files (x86)\Intel\oneAPI\2026.1\bin` are accessible in the system `PATH`. ### Step 2: Configure & AOT Compile Strata Engine Run [`sycl/build_windows.bat`](file:///D:/projects/strata/Strata/sycl/build_windows.bat) or invoke CMake directly: ```cmd cmake -S sycl -B build-sycl-aot -G Ninja ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_C_COMPILER=icx ^ -DCMAKE_CXX_COMPILER=icx ^ -DSTRATA_SYCL_AOT=bmg-g21 ^ -DSTRATA_SYCL_PARITY=OFF cmake --build build-sycl-aot --target strata --config Release ``` *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`) ```cmd cmake -S tools/vision -B build-vision -G Ninja ^ -DCMAKE_BUILD_TYPE=Release ^ -DCMAKE_CXX_COMPILER=cl cmake --build build-vision --config Release copy build-vision\strata_vision.exe build-sycl-aot\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_xs` with speculative decoding enabled (`--spec 6 --mtp-max 4 --lookup 3`). Metrics were gathered directly from `/metrics` and the hardware telemetry pipeline. ### 5.2 Benchmark Results Table | Workload Scenario | Context (Prompt / Output) | Decode Speed | Cache Hit Rate | MTP Acceptance | Observations | | :--- | :--- | :--- | :--- | :--- | :--- | | **Short Dialogue** | 81 prompt / 100 out | **21.0 tok/s** | **75.8%** | **84.8% (67/79)** | Snappy interactive chat; instant time-to-first-token. | | **Medium Context** | 59,272 prompt / 98 out | **20.4 tok/s** | **74.0%** | **85.0% (68/80)** | KV cache remains responsive over PCIe streaming. | | **Heavy Stress Test** | **74,213 prompt / 3,649 out** | **17.8 tok/s** | **66.2%** | **68.6% (1892/2757)** | **237.7 seconds continuous generation**. Zero memory leaks, steady 60°C GPU temp. | | **Multimodal Vision** | 1 synthetic test image | ~8.01s total | N/A | N/A | CPU inference; **0 MB VRAM consumed**; exact shape/color recognition. | ### 5.3 Comparative Analysis ```mermaid xychart-beta title "Decode Speed Comparison (tokens/second)" x-axis ["llama.cpp / Ollama (Offload)", "Strata v0.1.3x (Initial Win11)", "Strata v0.1.40.4 (Optimized Win11)"] y-axis "Tokens / Second" 0 --> 25 bar [2.5, 17.1, 21.0] ``` 1. **Versus llama.cpp / Ollama**: - Running a 125B parameter MoE model on a 12 GB GPU with standard llama.cpp requires offloading 36+ layers to the CPU, yielding **1.5 ~ 3.0 tok/s**. - Strata achieves **21.0 tok/s**, representing an **8x to 10x speedup** on identical hardware. 2. **Versus Pre-Upgrade Strata (v0.1.3x)**: - Decode speed increased from ~17.1 tok/s to **21.0 tok/s (+22.8% speedup)**. - Cache hit rate improved from ~62.5% to **75.8%**, driven by the expansion to **2,808 resident VRAM expert slots** (+67 slots). - Under heavy 74K token long-context load, v0.1.40.4 maintained **17.8 tok/s** without degradation. --- ## 6. Runtime Configuration & Startup The engine is managed via configuration file [`strata-iq2_xs.json`](file:///D:/projects/strata/Strata/strata-iq2_xs.json): ```json { "engine": "build-sycl-aot/strata.exe", "vision_encoder": "build-sycl-aot/strata-vision.exe", "model": "qwen3.8-flash-next-iq2_xs", "args": [ "--max-context", "262144", "--kv-resident", "32768", "--kv", "int8", "--stream-experts", "--expert-cache", "2808", "--resident-pinned", "--spec", "6", "--mtp-max", "4", "--lookup", "3" ] } ``` To start the server, execute [`START-IQ2_XS.bat`](file:///D:/projects/strata/Strata/START-IQ2_XS.bat) or: ```cmd python serve/server.py --engine strata --config strata-iq2_xs.json --port 8080 ``` * **Web UI**: `http://127.0.0.1:8080/` * **OpenAI API**: `http://127.0.0.1:8080/v1/chat/completions` * **Anthropic API**: `http://127.0.0.1:8080/v1/messages` --- ## 7. 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.
Author
Owner

@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.

<!-- gh-comment-id:6156131766 --> @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](https://github.com/Niko1221/Strata/releases/tag/v0.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.
Author
Owner

@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.

Request Prompt Decode
23 tokens - 52-58 tok/s
2,100 tokens (2 chunks) 601 tok/s 48.5 tok/s
6,013 tokens (3 chunks) 708 tok/s 50.2 tok/s
65,944 tokens, 100K context, --kv-resident 32768 580 tok/s, needle found -
95,812 tokens, same 467 tok/s, needle found -
follow-up on the 96K text (81,920 reused), 300 tokens 438 tok/s on the new part 34.6 tok/s

Pictures 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_parity needs a model fixture, iq_parity / iq_parity_fixtures skip without theirs, s2_expert_grouped_parity shows the same 4 bitwise differences (host reference within tolerance) as the Linux 2x B60 report of 2026-10-04, and gr_parity fails in the opt-in STRATA_QFUSE path. conversation_snapshot_test, which aborted in that Linux report, passes here.

What is in the branch

  1. Build fixes, all inside if(WIN32) / #if defined(_WIN32) (the same macro collisions as above, handled once in a force-included win_compat.hpp where possible): /fp:precise, /Qmkl:sequential and /W3 for icx's MSVC driver; pread as a positioned ReadFile; and in pinned.dp.cpp the Windows pinned-memory budget, which took the device LUID from cudaGetDeviceProperties in a _WIN32 branch DPCT never migrated, now gets it from sycl::ext::intel::info::device::luid.
  2. Scripts: sycl/tools/win-env.bat (Visual Studio via vswhere, oneAPI via ONEAPI_ROOT), win-build.bat, win-build-tests.bat, win-build-vision.bat, win_prepare.py (setup.py's own download / pack / MTP steps) and sycl/serve/strata-sycl.bat (the twin of strata-sycl.sh, no container).
  3. A stall that only a layer split hits. With --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 (the std::async in Prefill::run_impl): same binary, 1,430 tokens in 512-token chunks, STRATA_SPLIT_SERIAL=0 stalls in the third chunk and =1 passes; 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 (=0 turns it off; Linux unchanged, =1 turns it on there). I do not know the cause.
  4. A Windows section in docs/INTEL_ARC.md.

Not run: a Linux build of these changes (they are Windows-only blocks, but sycl/CMakeLists.txt is shared); CUDA and HIP builds (nothing outside sycl/ and docs/ 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.

<!-- gh-comment-id:6459188218 --> @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. | Request | Prompt | Decode | |---|---|---| | 23 tokens | - | 52-58 tok/s | | 2,100 tokens (2 chunks) | 601 tok/s | 48.5 tok/s | | 6,013 tokens (3 chunks) | 708 tok/s | 50.2 tok/s | | 65,944 tokens, 100K context, `--kv-resident 32768` | 580 tok/s, needle found | - | | 95,812 tokens, same | 467 tok/s, needle found | - | | follow-up on the 96K text (81,920 reused), 300 tokens | 438 tok/s on the new part | 34.6 tok/s | Pictures 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_parity` needs a model fixture, `iq_parity` / `iq_parity_fixtures` skip without theirs, `s2_expert_grouped_parity` shows the same 4 bitwise differences (host reference within tolerance) as the Linux 2x B60 report of 2026-10-04, and `gr_parity` fails in the opt-in `STRATA_QFUSE` path. `conversation_snapshot_test`, which aborted in that Linux report, passes here. **What is in the branch** 1. Build fixes, all inside `if(WIN32)` / `#if defined(_WIN32)` (the same macro collisions as above, handled once in a force-included `win_compat.hpp` where possible): `/fp:precise`, `/Qmkl:sequential` and `/W3` for icx's MSVC driver; `pread` as a positioned `ReadFile`; and in `pinned.dp.cpp` the Windows pinned-memory budget, which took the device LUID from `cudaGetDeviceProperties` in a `_WIN32` branch DPCT never migrated, now gets it from `sycl::ext::intel::info::device::luid`. 2. Scripts: `sycl/tools/win-env.bat` (Visual Studio via vswhere, oneAPI via `ONEAPI_ROOT`), `win-build.bat`, `win-build-tests.bat`, `win-build-vision.bat`, `win_prepare.py` (setup.py's own download / pack / MTP steps) and `sycl/serve/strata-sycl.bat` (the twin of strata-sycl.sh, no container). 3. **A stall that only a layer split hits.** With `--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 (the `std::async` in `Prefill::run_impl`): same binary, 1,430 tokens in 512-token chunks, `STRATA_SPLIT_SERIAL=0` stalls in the third chunk and `=1` passes; 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 (`=0` turns it off; Linux unchanged, `=1` turns it on there). I do not know the cause. 4. A Windows section in docs/INTEL_ARC.md. **Not run:** a Linux build of these changes (they are Windows-only blocks, but `sycl/CMakeLists.txt` is shared); CUDA and HIP builds (nothing outside `sycl/` and `docs/` 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.
Author
Owner

@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-split multi-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, engine 0.1.52) and integrated your sycl::ext::intel::info::device::luid and STRATA_SPLIT_SERIAL patches. Building on your luid idea, we also completed a few new additions for single-card 12 GB setups and Windows telemetry:

  1. SYCL port of STRATA_ROUTE_PRIOR (sycl/src/kernels/cuda/route_prior.dp.cpp):
    • Upstream 0.2.7 added residency-biased routing (STRATA_ROUTE_PRIOR=1.5 default on <= 13 GiB cards) on CUDA/HIP, which was still a no-op stub on SYCL.
    • We ported add_resident_route_prior to SYCL and wired it into sycl/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 wait 43.2 ms/round)
      • STRATA_ROUTE_PRIOR=1.5 (default): 31.30 tok/s (+81.9%, CPU pool wait drops to 19.6 ms/round)
  2. LUID-matched DXGI free VRAM query (sycl/include/dpct/device.hpp):
    • Since sycl::aspect::ext_intel_free_memory is unsupported on the Windows Level Zero driver, dpct::device_ext::get_memory_info now uses sycl::ext::intel::info::device::luid + IDXGIFactory4::EnumAdapterByLuid + IDXGIAdapter3::QueryVideoMemoryInfo so --expert-cache auto accurately sizes the VRAM cache per card on both single- and multi-GPU Windows systems.
  3. 100% hardware-backed Windows Intel telemetry (serve/telemetry.py):
    • Replaced the slow PowerShell WMI startup query, hardcoded TDP table, and estimated PCIe bandwidth with direct native calls:
      • zeDeviceGetProperties + ze_device_luid_ext_properties_t (stype=0x0001000d) for device name and hardware LUID (~43 ms init) coupled with DXGI AdapterLuid matching for DedicatedVideoMemory;
      • Level Zero Sysman zesPowerGetLimitsExt for real firmware sustained TDP (190.0 W on B580);
      • Level Zero Sysman Copy Engine activity (ZES_ENGINE_GROUP_COPY_ALL, zesEngineGetActivity) + WDDM D3DKMTQueryStatistics (PagingTransfer by 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.

<!-- gh-comment-id:6470712270 --> @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-split` multi-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`, engine `0.1.52`)** and integrated your `sycl::ext::intel::info::device::luid` and `STRATA_SPLIT_SERIAL` patches. Building on your `luid` idea, we also completed a few new additions for single-card 12 GB setups and Windows telemetry: 1. **SYCL port of `STRATA_ROUTE_PRIOR` (`sycl/src/kernels/cuda/route_prior.dp.cpp`)**: - Upstream `0.2.7` added residency-biased routing (`STRATA_ROUTE_PRIOR=1.5` default on `<= 13 GiB` cards) on CUDA/HIP, which was still a no-op stub on SYCL. - We ported `add_resident_route_prior` to SYCL and wired it into `sycl/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 wait `43.2 ms/round`) - `STRATA_ROUTE_PRIOR=1.5` (default): **31.30 tok/s** (**+81.9%**, CPU pool wait drops to `19.6 ms/round`) 2. **LUID-matched DXGI free VRAM query (`sycl/include/dpct/device.hpp`)**: - Since `sycl::aspect::ext_intel_free_memory` is unsupported on the Windows Level Zero driver, `dpct::device_ext::get_memory_info` now uses `sycl::ext::intel::info::device::luid` + `IDXGIFactory4::EnumAdapterByLuid` + `IDXGIAdapter3::QueryVideoMemoryInfo` so `--expert-cache auto` accurately sizes the VRAM cache per card on both single- and multi-GPU Windows systems. 3. **100% hardware-backed Windows Intel telemetry (`serve/telemetry.py`)**: - Replaced the slow PowerShell WMI startup query, hardcoded TDP table, and estimated PCIe bandwidth with direct native calls: - `zeDeviceGetProperties` + `ze_device_luid_ext_properties_t` (`stype=0x0001000d`) for device name and hardware LUID (~43 ms init) coupled with DXGI `AdapterLuid` matching for `DedicatedVideoMemory`; - Level Zero Sysman `zesPowerGetLimitsExt` for real firmware sustained TDP (`190.0 W` on B580); - Level Zero Sysman Copy Engine activity (`ZES_ENGINE_GROUP_COPY_ALL`, `zesEngineGetActivity`) + WDDM `D3DKMTQueryStatistics` (`PagingTransfer` by 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.
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#620
No description provided.