mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #5540] [Engine] sycl: count helper/peer caches before running the adaptive tier (helper mode decode 32 -> 61 tok/s) #5513
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#5513
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/5540
Author: @Captain-Tripps
Created: 11/7/2026
Status: 🔄 Open
Base:
main← Head:fix/sycl-adapt-helper-resident📝 Commits (1)
5723ff2sycl: count helper/peer caches when deciding every expert is on a GPU📊 Changes
1 file changed (+19 additions, -1 deletions)
View changed files
📝
sycl/src/program/generate.cpp(+19 -1)📄 Description
Problem and result
In the SYCL serve path, the adaptive expert tier decides whether to run from
all_experts_resident(
sycl/src/program/generate.cpp, v0.2.12 line 8339). That check reads only the primary card'shost_res. With ahelper card (
--expert-cache-device1 auto), the helper holds the experts the primary does not, so every expert is onsome GPU, but the check says no and the tier keeps running its rounds.
Measured on two Arc Pro B70 cards in helper mode: decode goes from 32.1 to 61.3 tok/s (median of 3 fresh starts
each). Turning the tier off by hand with
--adapt-every 0gives 55.0 tok/s on the same setup.Before, the stock engine log showed a primary hit rate of 91-96%, with the rest read over PCIe or from the helper.
After, every routed expert is a hit on the primary or the helper (100.0%), and the engine prints one new line at start:
strata generate: every expert is on a GPU (primary + helper/peer caches); adaptive tier off.Related discussion
None for this exact check. Nearby: #731 (duplicate slots across helper and primary) and #854 (
RemoteExperts::holds),whose live
holds()query this change reuses.Approach
An expert counts as on a GPU when the primary holds it, a helper cache holds it (
RemoteExperts::holds), or the peertier holds it (
peer.has). When all experts are on a GPU, the adaptive tier's usage tracking is not started, which isthe same as
--adapt-every 0, and one log line says so.all_experts_on_gpusreduces to the oldall_experts_resident.--expert-profile-savekeep the oldcheck.
n_layers * n_expertentries at start, run only when a helper or peer is configured.Validation
Environment: Windows 11, two Arc Pro B70 (32 GB each), driver 32.0.101.8976, oneAPI DPC++ JIT build
(
-DSTRATA_SYCL_AOT= -DSTRATA_SYCL_XE2_JIT=ON).146df3c4), the same asmainwhen this PR was opened, plus a local Windows build patch(icx flag spellings,
pread/memmemshims; similar to #3607, not part of this PR). That patch is the same for bothbuilds.
sycl/serve/server_intel.py, with config"gpu": [0]and both cards visible to theengine.
--max-context 200000 --kv int8 --spec 2 --mtp <rt> --spec-min-p 0 --ple-io mmap --stream-experts --expert-cache auto --vram-reserve-mib 1024 --prefill 8192 --no-prefill-borrow --conversation-cache-mib 32768 --conversation-cache-slots 4 --suffix-draft 0 --lookup-chain 0 --mtp-max-t 4 --expert-cache-device1 auto.Passed:
The SYCL
stratatarget builds with this change (Windows, icx, JIT).Served A/B: before each start, the Windows standby list was purged and a fresh server process started. Each start
ran 4 prompts (code, prose, explanation, summary) of up to 400 tokens, temperature 0, thinking off. Decode tok/s is
the server's
timings.predicted_per_second, median per start:--adapt-every 0Load time was 33-34 s in every arm. Answers were coherent in all arms. At temperature 0 the wording varies a little
from start to start within every arm, and in the same way in all three, not by build.
Failed:
Not run:
--peer-device): that branch was not exercised, so thepeer.haspart is untested.Limits
--adapt-every 0. I have not found why.src/program/generate.cpp(around line 12730 onmain) has the same!all_experts_residentcondition for the adaptive tier. I did not build or test a CUDA helper setup, so it is notchanged here.
generatepath in the SYCL file (around line 13139) turns the tier on with noresidency check, and is not changed.
"gpu", the launcher makes a layer split by default, so this only affectsusers who set up a helper card.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.