mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#3741
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/1890
Author: @demetree
Created: 10/10/2026
Status: ❌ Closed
Base:
main← Head:intel-vram-headroom-dxgi📝 Commits (10+)
223ee70serve: make the expert-cache VRAM headroom a knob, opt-in on CUDA and HIP (#1549)fe7aaa4probe+port: a live free-VRAM figure for the OpenCL backend (#1549)9f1b6a5Windows/OpenCL bring-up for the merged SYCL port, and a live free-VRAM figure (#1549)9188d55sycl: the serve-side VRAM check asks the same source as the cache sizing99664a1sycl: the per-layer sizing path asks the same source as the auto branch6cdf81fsycl verify: the eager path replays the commit instead of dereferencing a null graph (#1549)d2a7ddasycl: the free-VRAM comment names the fallback that exists (#1549)1baf4c9sycl: opt-in Level Zero on Windows, and the diagnosis behind it7e3ab52sycl: Level Zero needs the eager replay - command graphs stall the verify window3664c0adocs: the Level Zero diagnosis, and why the driver must be the generic Arc line📊 Changes
18 files changed (+1166 additions, -97 deletions)
View changed files
➕
LEVEL_ZERO_FINDINGS.md(+306 -0)📝
include/strata/core/expert_cache.hpp(+43 -0)📝
src/program/generate.cpp(+11 -1)📝
sycl/CMakeLists.txt(+80 -5)📝
sycl/include/strata/core/mtp.hpp(+5 -0)📝
sycl/include/strata/core/verify.hpp(+3 -0)➕
sycl/probe/vram_pressure.cpp(+120 -0)➕
sycl/serve/strata-sycl.bat(+99 -0)📝
sycl/src/core/expert_cache.cpp(+46 -0)📝
sycl/src/core/gguf_expert_source.cpp(+43 -4)📝
sycl/src/core/mtp.cpp(+75 -28)📝
sycl/src/core/pinned.dp.cpp(+4 -1)📝
sycl/src/core/verify.cpp(+24 -6)📝
sycl/src/kernels/cuda/verify_kernels.dp.cpp(+3 -3)📝
sycl/src/prefill/gemm.dp.cpp(+229 -18)📝
sycl/src/program/generate.cpp(+38 -31)➕
sycl/tools/build.bat(+31 -0)➕
sycl/tools/onemath_config.hpp(+6 -0)📄 Description
What this is
mainnow carries the SYCL port, built and measured on Linux with Level Zero, where oneMKL and command graphs both work. This is the Windows half — the pieces Windows needs that a Linux build never exercises, plus the expert-cache sizing fix that came out of building it.Rebased onto
7695859a(the 0.1.43 release); the first version of this PR was againsta1c47bc9. All measurements below are from the rebased tree.Single card, all measurements: Arc Pro B70, 32 GB, Windows 11 24H2, driver 32.0.101.8976 (Arc Pro line) / 32.0.101.9034 (generic), OpenCL + eager replay, engine 0.1.43.
The eight commits
223ee707fe7aaa449f1b6a579188d55199664a1d6cdf81f5d2a7ddac1baf4c95What it changes
1. The Windows build layer —
sycl/CMakeLists.txt,sycl/tools/build.bat,sycl/tools/onemath_config.hpp,sycl/serve/strata-sycl.bat. Compiler-ID gating (/fp:preciseand/W3for MSVC,-fp-model=preciseelsewhere — the precise model is load-bearing:quantize_act_paritygoes from byte-exact to 303k mismatches without it),STRATA_SYCL_JIT_STATELESS(the IGC >4 GiB surface-offset bug), the oneMKL stub for an installer-free conda install, and the DLLs besidestrata.exe.2. Portability fixes in the migrated copies — the
STRATA_USE_CUDAguard inpinned.dp.cpp,OUT→WRITE_OUTinverify_kernels.dp.cpp, Windows file I/O ingguf_expert_source.cpp, thesmall/memmemfixes ingenerate.cpp, and the plain-SYCL fallback GEMM ingemm.dp.cppgated ononemkl_usable().3. The live free-VRAM figure — on OpenCL there is no free-VRAM query at all (
ext_intel_free_memoryneeds Level Zero sysman), soget_memory_infoanswers 0, which sizes the cache to nothing.own_gpu_local()asks DXGI. Same binary, free card, 2047-token prompt: 0 slots / refused → 12,288 slots / 23.42 GiB, prompt 81.1 tok/s, decode 66.6 tok/s.4.
6cdf81f5, submitted separately as #2106 — completesSTRATA_VERIFY_EAGERfor the commit path.main's eager support covers the window (record_window,run()'s guard) but not the commit;mtp.cpp'sprepare_chaindocuments the gap out loud.5.
1baf4c95, the Level Zero diagnosis — opt-inSTRATA_SYCL_LEVEL_ZERO=1in the launcher, off by default, plusLEVEL_ZERO_FINDINGS.mdrecording how it was established. Off by default because the serve request path stalls intermittently; when it runs it is 108.8 tok/s decode and 81.1 prefill against OpenCL's 66.6 / 81.1, with the v1 Level Zero adapter beating v2 by +24% decode and 34x faster graph capture.The one thing I would most want reviewed
ur_adapter_level_zero.dllimportsUMF.dlland theVCRUNTIME140*set, andsycl/CMakeLists.txtstages neither besidestrata.exe. The adapter fails to load, the UR loader reports only OpenCL, andONEAPI_DEVICE_SELECTOR=level_zero:0kills the process with0xC0000409beforemainprints anything. The silence is the expensive part: every Level Zero adapter failure looks like "there is no Level Zero here", which is what sent me down the OpenCL path in the first place and cost days. The workaround in this PR isLibrary\binfirst onPATH; the proper fix is to extend the copy list.Second, and related: the v1 Level Zero adapter beats v2 decisively on this card (+24% decode, graph capture 276 ms vs 9,495 ms). #1940 pins v2 on for graph replay (intel/llvm#23073); on a B70 with this workload that trade is the wrong one.
What this leaves alone
Every new feature is opt-in and the default path is byte-identical unless a variable is set:
STRATA_EXPERT_CACHE_HEADROOMdefaults to 0 everywhere,STRATA_SYCL_LEVEL_ZEROis unset by default, andSTRATA_VERIFY_EAGERis only read where it already was. Every launcher variable is only written when not already defined, so an explicitONEAPI_DEVICE_SELECTORfor a two-card split still wins. No engine source changed in1baf4c95.What I could not verify — please read before reviewing
9f1b6a57(pinned.dp.cpp's unguarded CUDA calls, theOUTmacro inverify_kernels.dp.cpp). So it cannot be built standalone here.gemm.dp.cpp:1031), the likely unsupported type; that is a hypothesis, not a measurement. So the prompt path is on the plain-SYCL fallback and the prefill figures are not oneMKL-backed.LEVEL_ZERO_FINDINGS.md.Suggested review order
gemm.dp.cpp— the plain-SYCL fallback is what makes prompts run at all here, and it is the biggest piece.verify.cpp— thecapture_commiteager guard (#2106 is the same change standalone).expert_cache.cpp— the DXGI figure, since it changes sizing behaviour on every SYCL backend.CMakeLists.txt— the copy list above, and the compiler-ID gating.I would rather split this:
223ee707+d2a7ddacare one coherent knob,6cdf81f5is #2106, and1baf4c95is really a bug report about the copy list with an opt-in switch attached.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.