#6455 [Engine] SYCL: an Xe3 GPU (Panther Lake, Arc B390) runs the Battlemage kernels; STRATA_INTEL_GEN sets the class
open · draft · @criskurtin · 0 Kommentare · Auf GitHub
BenchmarksSetup & installServer & APIAMD / HIPNVIDIA / CUDAModels & quantsDocumentationWindowsLinux
Beschreibung
## Problem and result `intel_gpu_gen()` knows Alchemist and Battlemage by the discrete cards' architecture ids or by the marketing name. Compute runtime 26.35 names an Arc Pro B390 (`8086:b086`) "Intel(R) Graphics [0xb086]" and reports its architecture as `intel_gpu_ptl_h`. Neither rule matches, so the GPU is Unknown and gets the generic kernels: no int8 DPAS prompt attention, no fused int8 prompt experts, no copy engine and none of the Battlemage decode reuse paths. (A B390 that its runtime names "Intel(R) Arc(TM) B390 GPU", as in #515, already matched by name.) With this PR an Xe3 GPU (`intel_gpu_ptl_h` or `intel_gpu_ptl_u`) is classed with Battlemage. On the B390, prompts were read 70% faster at 3,197 tokens and 32% faster at 12,676 tokens; decode stayed the same or got slightly faster. `terminal/tools/ab_engine.py`, 3 rounds, arms alternated, a fresh server per arm; `STRATA_INTEL_GEN=unknown` gives main's class on the same build: | prompt | arm | prompt tok/s, median (range) | decode tok/s on that prompt, median (range) | |---|---|---|---| | 3,197 tokens | `unknown` (main's class) | 288.1 (272.8-293.2) | 20.4 (20.3-20.8) | | 3,197 tokens | this PR | 490.1 (469.7-496.1) | 20.3 (20.1-20.4) | | 12,676 tokens | `unknown` | 387.1 (384.8-397.4) | 17.8 (17.5-20.0) | | 12,676 tokens | this PR | 509.6 (503.6-636.6) | 20.1 (19.9-20.5) | The default arm's engine log adds the copy engine, the int8 DPAS (ESIMD) prompt attention, the fused int8 prompt experts and the IQ3 row-reuse lines, which the `unknown` arm does not print. The greedy answers of the short prompts are the same in both arms. ## Related discussion #6448, question (b): whether Xe3 as Battlemage should be its own PR. Scope is not agreed yet, so this stays a draft. It is a per-generation default, as in #5406. This PR does not depend on #6453 in code: it applies to main alone and merges cleanly with #6453 and #6454 in any order. It was measured on top of #6453, because on main alone this GPU's expert cache is sized as #6448 describes. ## Approach - `intel_gpu_xe3()` matches the architecture ids only. The runtime reports `intel_gpu_ptl_h` here (a SYCL query of `ext::oneapi::experimental::info::device::architecture`), so no PCI-id table is needed. - `intel_gpu_gen()` checks `STRATA_INTEL_GEN` first, then the discrete-card architecture match, then Xe3, then the name rule. A discrete card returns before the Xe3 query, so its class is unchanged (code reading; no discrete card here). - `bmg_arch()` in `esimd_moe.dp.cpp` follows the same rule for the fused int8 prompt experts; `available()` still checks the s8 8x16x32 DPAS combination. - `STRATA_INTEL_GEN=battlemage|alchemist|unknown` sets the class of any Intel GPU, for measuring one generation on another's kernels and for taking an Xe3 GPU back off them. Other values are ignored with a warning. It is read in `engine/sycl/include`, which `tools/settings_register.py` does not scan, so it is in `docs/INTEL.md`'s switch table. - `STRATA_WINDOW_SYNC` is untouched: `verify.cpp` keeps 1 on an integrated GPU. ## Validation **Passed:** - Arc Pro B390 (Core Ultra X9 388H, 62 GiB LPDDR5X shared, Fedora 44, kernel 7.2.11, compute runtime 26.35.39758), oneAPI DPC++ 2026.1.1, oneMKL 2026.1.0. Package built with `tools/packaging/build_sycl_linux.sh` from main 3142b66b9 + #6453 + this commit; model and run config as in #6453. - `python terminal/tools/ab_engine.py b390.json generic:exe=<build>,STRATA_INTEL_GEN=unknown bmg:exe=<build> --rounds 3 --long-words 3000`, and the same with `--long-words 12000`: the table above. All 12 runs with their engine logs and a 1-second `/proc/meminfo` log: https://github.com/xenonhr/Strata/tree/b390-evidence (`xe3-4k/`, `xe3-16k/`, `kl/`, `kl2.txt`, `ctest-*.txt`). - CI's compile (`cmake -S engine/sycl ... -DSTRATA_SYCL_PARITY=OFF -DSTRATA_SYCL_IQ_DECODE_FAST=ON`, target `strata`): no errors, and no warning from the changed lines. - `uv run --python 3.12 --with-requirements terminal/requirements.txt --with-requirements terminal/requirements-dev.txt --with-requirements terminal/requirements-build.txt python tools/check --strict --only py-tools,docs` at ae220a6d6: py-tools 1851 passed, docs 6 passed; 0 failed. `python3 tools/settings_register.py --check`: passed. - `ctest` of a parity build (main 3142b66b9 + #6453 + this commit) on the B390: 74 of 96 pass with the default class and 75 with `STRATA_INTEL_GEN=unknown`; the difference is `qsa_prompt_attn_parity` (below). The 21 that fail in both runs also fail in main 3142b66b9's own parity build on this machine: `ple_parity` needs a Q2_0 model file that is not here, `verify_parity` reads NaN probabilities, and 19 `native_expert_parity_new_*` cases fail on the CPU side (AVX2 rows against ggml; this CPU has no AVX-512). - End to end, the first token's distribution moves less with the Battlemage kernels than between two runs of the generic ones, with the same top-1 every time (`STRATA_DUMP_FIRST_LOGITS` in the engine's one-shot mode, the same token ids, `tools/research/tools/ab-harnesses-2026-10/arc/kl.py`): | prompt | KL, generic run 1 against run 2 | KL, generic against this PR | |---|---|---| | 5,872 tokens of `docs/` text | 3.4e-2 | 1.5e-2 | | 6,345-token word list | 1.8e-4 | 1.4e-4 | | 17,401 tokens of `docs/` text | 1.5e-2 | 1.1e-2 | - Fork CI at the same head, run by hand: [Backend compile checks](https://github.com/xenonhr/Strata/actions/runs/44840612307) (SYCL oneAPI 2026.1, CUDA 12.9 and 13.0, HIP ROCm 7.2, Metal), and every job of [Checks](https://github.com/xenonhr/Strata/actions/runs/44840616341) but the test under Failed. **Failed:** - `qsa_prompt_attn_parity` with the default class: the int8 DPAS prompt attention agrees with the FP32 kernel to 1.2e-4-1.3e-4 of the output scale in the three int8 cases (ctx 8192/512 queries, 1500/512, 2100/256), against the test's 1e-4; its error against FP64 is 2.9e-4-3.2e-4, where the FP32 kernel's is 1.8e-6-2.0e-6. The FP16 and Q4_0 cases pass, and with `STRATA_INTEL_GEN=unknown` the kernel is not used and the test passes. Main never runs this kernel on this GPU, so I cannot tell whether a Battlemage card passes this test: does a B70? - In CI, one test that fails the same way on main 3142b66b9 ([Checks](https://github.com/Niko1221/Strata/actions/runs/44699739037)): `terminal.tools.test_strata_mcp.Install::test_a_start_that_came_in_before_a_cancel_does_not_launch_the_job` on Windows. **Not run:** - `terminal/tools/force_check.py gate`, the gate for a change to prompt arithmetic: it needs a neutral writer model server I do not have here. The first-token KL above is the check I could run. - Any other Xe3 GPU (`intel_gpu_ptl_u`, Wildcat Lake) and any discrete card. - CUDA, HIP and Metal on their GPUs: no file of theirs changed; CI compiles them (above). ## Limits - Only one Xe3 GPU, the Arc Pro B390, was measured. - An Xe3 GPU on a runtime that does not report its architecture stays Unknown; `STRATA_INTEL_GEN=battlemage` covers that case by hand. - The 12,676-token runs spread from 504 to 637 tok/s on this branch; the table compares medians. Prepared with an AI coding assistant (Claude Code); every number above was measured on the machine named in Validation. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Mehr auf der Site
Links zu Install, Modellen, Releases.