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#4539
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/3273
Author: @hotschmoe
Created: 10/19/2026
Status: 🔄 Open
Base:
main← Head:pr/sycl-ep-prefill-reduce📝 Commits (7)
53ea903sycl: --expert-parallel-device N, two Arc cards compute each layer's experts togetheree9896eserve: a config with --expert-parallel-device and several GPUs gets no --layer-splitd9f59bbsycl: expert parallel: system-scope barriers before the exchange flagsc933994sycl: with --expert-parallel-device, card N computes its own experts of each prompt chunk3172af9sycl: opt in to reducing peer prompt rows before IPC return86d8ed2sycl: optionally push reduced prompt sums to primary-owned memory1da1f26docs: EP prompt row reduction and PUSH, measured on 0.2.0-beta📊 Changes
15 files changed (+1301 additions, -37 deletions)
View changed files
📝
docs/INTEL.md(+73 -0)📝
include/strata/prefill/prefill.hpp(+3 -0)📝
serve/server.py(+6 -2)📝
serve/test_server.py(+5 -0)📝
sycl/CMakeLists.txt(+2 -1)➕
sycl/include/strata/core/ep_mem.hpp(+62 -0)📝
sycl/include/strata/core/verify.hpp(+52 -0)➕
sycl/include/strata/kernels/ep_kernels.hpp(+54 -0)➕
sycl/probe/ep_prefill_reduce.cpp(+102 -0)📝
sycl/src/core/verify.cpp(+216 -5)➕
sycl/src/kernels/cuda/ep_kernels.dp.cpp(+163 -0)📝
sycl/src/kernels/cuda/verify_kernels.dp.cpp(+42 -10)➕
sycl/src/kernels/resident_plan_ep_parity.cpp(+143 -0)📝
sycl/src/prefill/prefill.cpp(+177 -16)📝
sycl/src/program/generate.cpp(+201 -3)📄 Description
Problem and result
With
--expert-parallel-device(#1798, prompt path #2205), the peer card returns one FP32 row per routed expert of every prompt token over IPC, and the primary combines them. On two Arc Pro B70s that return dominates the prompt read: at 32K tokens the engine reads 720 tok/s, against 2,078 for a plain two-card layer split of the same model.Two opt-in switches, both off by default:
STRATA_EP_PREFILL_REDUCE=1: the peer sums its routed experts per token first and returns one FP32 row per token; the primary adds its own routed sum and the shared expert. Changes the FP32 addition order (text can change).STRATA_EP_PREFILL_PUSH=1(with the reduction): the sum region lives on the primary and the peer writes it through the IPC mapping (posted writes, system-scope fences), instead of the primary reading it from the peer. Transport only: bitwise the reduction's output.Result on 0.2.0-beta, two B70s, prompt tok/s at 4K / 32K: unset 635 / 720, reduce 993 / 1,264 (+56% / +76%), reduce + push 1,148 / 1,514 (+81% / +110%). Decode unchanged.
Related discussion
Stacked on #2205 (which builds on #1798), at @recutita's request in recutita/Strata#1. Only the top three commits are this PR; the four below them are #1798 and #2205 rebased onto 0.2.0-beta
maine88ee39d(the only conflict was indocs/INTEL.md;git range-diffshows #2205's commit unchanged against its current head4805fa9a). Opened as a draft until #1798 / #2205 have their two-card gate. No maintainer agreement on scope yet.Approach
sycl/src/prefill/prefill.cpp: the reduce path when the env is set (rows for the peer's experts summed on the peer with the routing weights, one row per token returned), the push variant allocating the sum region on the primary with the peer as importer. One stderr line when the reduction is on.sycl/src/kernels/cuda/ep_kernels.dp.cpp,sycl/include/strata/kernels/ep_kernels.hpp: the reduce kernel and its posted-write form, a system-scope fence per producer work item before the existing host peer wait.sycl/probe/ep_prefill_reduce.cpp(new): a two-card probe against an independent FP32 FMA oracle in the original router order.docs/INTEL.md: one section with the numbers and the probe commands.Unset: the existing per-expert rows and combine run as before (the env is read once at setup; the unset arm below is this binary with nothing set, not a separate build of the stack below).
Validation
Setup: 0.2.0-beta
maine88ee39d+ #1798 + #2205 (rebased) + this PR, head1da1f265(engine built at86d8ed20; the top commit is docs only). 2x Intel Arc Pro B70 32 GB, kernel 7.1, Compute Runtime 26.22.38646.4, SYCL AOTbmg-g31built with the repository dev image. Qwen3.8-Flash-Next ISTA GSQ-RCO IQ3_XXS,--expert-parallel-device 1 --prefill 8192 --max-context 65536 --kv int8 --spec 4 --mtp <BF16 draft layer> --mtp-max-t 4 --spec-min-p 0 --stream-experts --expert-cache auto, Docker--cap-add SYS_PTRACE, one slot, greedy, a fresh engine per arm, two fixed 512-token coding replies, then fresh 4K and 32K prompts.Passed:
ep-prefill-reduce-probeandep-prefill-reduce-probe --push(both cards):PASS cases=26 max_abs=9.53674316e-07each.STRATA_EP_PREFILL_REDUCE=1+ STRATA_EP_PREFILL_PUSH=1EP row reduction enabledin both reduce arms. Coherence true and per-card health passed after every stop.Failed: none observed.
Not run: the
mg_norepeat/exact_ppgate at 4096 and 20000 tokens (offered on #1798; happy to run it on this stack); two slots and--max-context 200000; a soak or stability run; CUDA/HIP (no file touched outsidesycl/anddocs/).Limits
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.