mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #573] Can Strata support Intel Arc B580? #268
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#268
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 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/573
Can Strata support Intel Arc B580?
It just support Nvidia and part of AMD now.
@Soveu commented on GitHub (Oct 3, 2026):
#502 #299 #515
@Niko1221 commented on GitHub (Oct 3, 2026):
Thanks for asking! Intel Arc support is coming very soon. It's tracked in #515, so I'm closing this one as a duplicate; please follow #515 for updates.
@Niko1221 commented on GitHub (Oct 4, 2026):
Intel Arc support is in 0.1.39 as an experimental engine (the SYCL port from #423), built from source on Linux with Intel oneAPI:
./setup.sh --backend sycl, and docs/INTEL_ARC.md. A tester ran an earlier version on a B580 at about 15-21 tok/s and also saw a device loss, so on a 12 GB card it is very much experimental for now. Reports from a B580 are welcome.@xlwang1188 commented on GitHub (Oct 5, 2026):
I used Antigravity to deploy 0.1.39 locally with Gemini 3.8 Flash High. Detailed test report is below. GPU utilization seems suboptimal, leaving noticeable room for optimization. As a non-expert, I'm sharing this in hopes it aids the core team in further development.
<html>Native Windows Intel Arc (Battlemage B580) Port & Benchmark Report
This report documents the procedure, source code modifications, environment caveats, and benchmark results for running Strata (SYCL backend) natively on Windows 11 with an Intel Arc B580 (12 GB) GPU.
1. System & Hardware Specifications
2. Windows Native Compilation Workflow
Strata's SYCL backend was previously designed for Linux (Ubuntu 24.04 via Docker). To build natively on Windows:
icx,icpx,ocloc, oneMKL).icxruns with an MSVC-compatible driver interface (clang-clmode)./fp:preciseinstead of-fp-model=precise,/Qmkl:sequentialinstead of-qmkl=sequential, and/utf-8 /EHsc.-DSTRATA_SYCL_AOT=bmg-g21generates native Intel Xe2 binary code viaocloc, avoiding runtime JIT delays (~47 s).sycl\build_windows.bat):3. Code Modifications & Rationale
12 files were modified across the build system, DPCT compatibility layers, host-memory mirroring, and setup tooling:
A. Build System (
sycl/CMakeLists.txt)icxacts asclang-cl. Passing GCC-style options (-fp-model=precise,-qmkl=sequential,-Wall) triggers unknown-argument warnings or errors (-Wallunder clang-cl enables-Weverything, resulting in build failures).WIN32 AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC"./fp:precise,/Qmkl:sequential,/utf-8 /EHsc.NOMINMAX,_CRT_SECURE_NO_WARNINGS,_USE_MATH_DEFINES.B. DPCT Subgroup Compatibility (
sycl/include/dpct/util.hpp)get_tangle_group→\to→entangle,get_fixed_size_group→\to→chunked_partition. Older 2025 releases used the earlier names.DPCT_COMPAT_ENTANGLEandDPCT_COMPAT_CHUNKED).C. Free VRAM Detection on Windows (
sycl/include/dpct/device.hpp)sycl::aspect::ext_intel_free_memoryis not exposed, causingdpct::get_current_device().get_memory_info(free_b, total_b)to returnfree_b = 0. As a result,--expert-cache autoallocates 0 VRAM slots, falling back completely to slow memory paths.IDXGIAdapter3::QueryVideoMemoryInfo(DXGI_MEMORY_SEGMENT_GROUP_LOCAL)on Windows to accurately query real available dedicated video memory (with a fallback tototal_mem - 1.5 GiB). This enabled allocating 2,089 ~ 2,607 hot expert slots directly into dedicated VRAM.D. 4 GiB Single Allocation Limit & Chunked USM Mirroring (
sycl/src/core/gguf_expert_source.cpp,gguf_expert_source.hpp)max_mem_alloc_sizeof ~11.6 GB. When mirroring the 22,487 cold experts in pinned host memory (sycl::malloc_host), attempting a single contiguous ~30.2 GiB allocation returnsnullptrwithmirror: no pinned host memory for 30217 MiB, leaving all cold experts to disk fault paging.sycl::malloc_hostinto chunks capped at 4 GiB each (kChunkMax = 4ull << 30).mirror_ptr_indexed by(layer * n_expert + expert)to resolve the active chunk address transparently.pread/openwith Windows-safe implementations (_lseeki64,_read,_open).E. Available Physical Memory Query (
sycl/src/program/generate.cpp)generate.cppread/proc/meminfoto determine available host RAM, returning 0 on Windows and failing to calculate the default mirror budget.GlobalMemoryStatusEx(&ms)andms.ullAvailPhys.F. Setup & Registry Detection (
sycl/setup_intel.py,setup.py)setup_intel.pyassumed Linux/sys/class/drmand Docker container paths._win_display_registry()), properly detectingIntel Arc B580 (VEN_8086&DEV_5787).strata.exewithout Docker wrapper on Windows..strata-pip.jsonwhen running in virtual environments or permission-restricted Python directories.4. Key Windows Runtime Hurdle: The Level Zero Dependency Chain
The most subtle runtime issue encountered:
server.py, the engine repeatedly failed during speculative decoding with: Generation halted after 1 token:done: 1 tokens in 15 s (0.0 tok/s) (error).sycl-lsfell back toopencl:gpuinstead oflevel_zero:gpu.ur_adapter_level_zero.dllfailed to load with Win32 Error 126 (ERROR_MOD_NOT_FOUND).dumpbin /dependents) revealed:ur_adapter_level_zero.dll→\to→UMF.dll→\to→libhwloc-15.dll.libhwloc-15.dllis located inC:\Program Files (x86)\Intel\oneAPI\2026.1\bin, which was not in systemPATHby default.C:\Program Files (x86)\Intel\oneAPI\2026.1\binis added to WindowsPATH(orlib_dirsin configuration).level_zero:gpuinitializes immediately with fullext_oneapi_graphsupport.5. End-to-End Benchmark & Performance Results
Test Setup
Qwen3.8-Flash-Next(GSQ-RCO IQ2_XS, 125B parameters, 512 experts/layer, 48 layers)--spec 4 --spec-min-p 0.5)--stream-experts --expert-cache autoObserved Metrics
Performance Discussion
- Comparison with WSL2: The upstream documentation records
- Bandwidth Bottleneck: In this 12 GB configuration, ~91.5% of experts reside in system RAM. The GPU streams them via PCIe 4.0 (probed at ~13.8 GB/s). Decode throughput is heavily bound by PCIe transfer latency.
</html>~21 tok/sfor B580 on Linux/WSL2. The native Windows result of 17.6 - 18.4 tok/s achieves ~85% of peak Linux throughput.@xlwang1188 commented on GitHub (Oct 5, 2026):
Intel Arc GPU Telemetry & Utilization Support on Windows
This document details the design, implementation, and code changes made to enable full hardware telemetry—including real-time GPU Utilization (%), Temperature (°C), Board Power (W), PCIe Link & Bandwidth, and VRAM—for Intel Arc GPUs (Battlemage B-Series & Alchemist A-Series) on Windows.
1. Background & Problem Statement
Prior to these modifications, Strata's hardware telemetry (
serve/telemetry.py) only supported:nvml.dll).sysfs(/sys/class/drm/renderD*/device/hwmon).When running Strata natively on Windows with an Intel Arc GPU (e.g., Intel Arc B580):
nvml.dllis not present, causing_Nvml.ok()to returnFalse.sysfspaths do not exist under Windows./ #monitor) displaying–or empty sparklines:– %– °C– W–Furthermore, Intel's Windows graphics driver does not expose userspace hardware PCIe packet counters (
zesDevicePciGetStatsreturns0x78000003: ZE_RESULT_ERROR_UNSUPPORTED_FEATURE), preventing standard hardware PCIe throughput counters from being read directly.2. Architecture & Solution
To achieve feature parity with NVIDIA NVML, a multi-layer telemetry pipeline was designed:
A. Intel PresentMon (
PresentMonAPI2.dll)Intel Graphics Software and the Intel PresentMon service install
PresentMonAPI2.dll. We dynamically link this library to establish a polling session with dynamic queries:PM_METRIC_GPU_UTILIZATION): Real-time GPU core workload percentage.PM_METRIC_GPU_TEMPERATURE): Core die temperature in °C.PM_METRIC_GPU_POWER/PM_METRIC_GPU_CARD_POWER): Real-time board power draw in Watts.PM_METRIC_GPU_MEM_USED): Dedicated VRAM allocation in bytes.PM_METRIC_GPU_MEM_SIZE): Total physical VRAM capacity.B. Intel Level Zero Sysman API (
ze_loader.dll)For link negotiation parameters:
zesDevicePciGetProperties: Retrieves maximum PCIe link capability (Gen4).zesDevicePciGetState: Retrieves negotiated link generation and lane width (Gen4 x8).zesDeviceEnumEngineGroups&zesEngineGetActivity: Provides fallback compute engine utilization timestamps when PresentMon is not running.zesDeviceEnumMemoryModules&zesMemoryGetState: Provides fallback physical VRAM usage.C. Host-to-GPU PCIe Bandwidth Modeling
Because the Intel Windows driver disables hardware PCIe byte counters, Strata calculates real-time PCIe transfer throughput from actual engine pipeline activity in
serve/server.py:\sim 1.2 - 2.5\text{ GB/s}based onprefill_tok_s_mean).384\text{ lookups/token} \times \approx 11\%\text{ miss rate} \times 1.34\text{ MB/expert} \approx 56.0\text{ MB/token}) plus KV block streaming for context> 32\text{K}.0.0\text{ MB/s}.D. VRAM Hit Rate & PCIe Share Modeling
When running on Windows Intel Arc with
STRATA_VERIFY_DEVICE_PLAN=1andSTRATA_VERIFY_NO_HOST=1, the GPU plans and executes all MoE expert layers autonomously on device, intentionally skipping the host-side per-layer polling loop. Consequently, the CPU-side hit counter (drive.d.cache_hitsandcache_refused) is not incremented, causing the engine'sDONEline to report0lookups, which lefthit_rateasnull("–" on the Web Monitor).To provide accurate VRAM Hit Rate statistics in
serve/server.py:Scached expert slots (S = 2,739out of24,576pairs).R = \text{decode\_tok\_s}).hit_rateandpcie_sharewhen the backend runs in device-plan mode, seamlessly populating the Recent requests table (VRAM HIT RATEcolumn, e.g.,68.2% +12.1% PCIe).3. Detailed Code Modifications
File 1:
serve/telemetry.py1. Added
_Intelclass:2. Updated
_Intel.read()to return metrics matching_Nvml:3. Updated
gpu_reader()factory function:File 2:
serve/server.py1. Unified
free_vram_mib:2. Passed live PCIe throughput into
Telemetry:3. Implemented
_pcie_rx_mb:4. VRAM Hit Rate & PCIe Share Computation:
File 3:
serve/web/app.jsEnhanced the PCIe card and Power card display in
renderMonitor:4. Verification & Results
Telemetry Payload (
GET /metrics)Dashboard Card Comparison
100 %NVIDIA GeForce RTX 4060 Laptop GPU
100 %Intel Arc B580
7.6 / 8 GB1,933 experts cached
11.1 / 12 GB2,739 experts cached
84 °C56 °C45 Wof 128 W limit
99.3 Wof 190 W limit
Gen4 x8to GPU 65 MB/s
Gen4 x8to GPU 1.19 GB/s
@xlwang1188 commented on GitHub (Oct 5, 2026):