mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1251] [CLOSED] --peer-device prompt share without P2P: host route, per-token sums, FP16 transfers (2.1-2.5x prompts on a no-P2P pair) #3337
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#3337
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/1251
Author: @guthirry
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:peer-host-route📝 Commits (5)
20e784cprefill: --peer-device's prompt share without P2P, through the layer split helper's mapped host routeee5b52bprefill: the no-P2P peer share sends each token's weighted sum back instead of its rows5b19ee5prefill: the no-P2P sums mode's two transfers in FP16b8e95a0prefill: the peer's per-token sums in one launch per group instead of one per expert24d76b7prefill: the no-P2P hand-off copies on a stream of their own📊 Changes
3 files changed (+310 additions, -8 deletions)
View changed files
📝
include/strata/prefill/kernels.hpp(+21 -0)📝
src/prefill/kernels.cu(+104 -0)📝
src/prefill/prefill.cpp(+185 -8)📄 Description
What
--peer-device's prompt share for GPU pairs without P2P (most GeForce pairs). Before this PR,set_peerrefused such a peer and the prompt path stayed on the primary GPU. Now:STRATA_PF_PEER_HOST=0restores the refusal.moe_combine_peeradds the sums to the primary's own rows.STRATA_PF_PEER_SUMS=0sends rows.mixed_himage, and the sums come back as FP16, saturated at ±65504.STRATA_PF_PEER_F16=0uses FP32.peer_gather_add), bitwise the same as one launch per expert.STRATA_PF_PEER_GATHER=0launches per expert.STRATA_PF_PEER_XSTREAM=0puts them on the compute stream.The P2P route is unchanged: everything new sits behind
!p2p.Credit. The design of 2-4 is eddoursul/Strata's second-GPU prompt path (custom branch commits
f8de703,2acfac4ande8ade66;moe_scatter_add/moe_gather_add/sums_to_f16). The commits that carry it list Eddoursul as co-author.Measured
Setup: RTX 3090 (PCIe 4.0 x4, behind the chipset; the PCIe probe reads 6.7 GB/s) and RTX 3080 Ti (x16). No P2P. i5-14600K, 93 GiB RAM, UD-Q4_K_XL. Both arms ran
--peer-device 1 --peer-reserve-mib 3000 --prefill auto:32768 --kv int8 --kv-resident 32768 --spec 4 --pcie-frac 0 --peer-adapt-swaps 384, withSTRATA_PF_PEER_STREAM=0.6 STRATA_PF_PEER_RING=160.Method: the same OpenAI requests through
serve/server.py, greedy, one at a time. Both arms use this branch's build, with the share off (STRATA_PF_PEER_HOST=0) or on.Prompt tok/s:
Decode tok/s:
Where the time went.
STRATA_PREFILL_TIMING=1with the share off shows 70% of an 8K prompt's GPU time inwait copy: the primary streaming experts over its x4 link. After this PR, the remaining wait is the peer's hand-off. The 3080 Ti is idle about 60% of the time, because the hand-off is serial per layer and the dense steps run over the whole chunk. Overlapping it the way the fork does would need the dense steps in sub-chunks; that is not part of this PR.Settings these numbers used, beyond the defaults (all opt-in already):
STRATA_PF_PEER_STREAM=0.6. The default 0.35 was measured on P2P pairs. Here at 8K: 0.35 gives 1,140, 0.6 gives 1,284, 1.0 gives 1,189 (before 3-5).STRATA_PF_PEER_RING=160with--peer-reserve-mib 3000. The 48-slot ring holds a third of a layer's peer-streamed experts at 0.6. At 8K: 48 slots give 1,485, 160 give 1,671.-DSTRATA_MMQ_KQUANTS=ON, because the peer share needs MMQ on every layer. Without it,set_peersays "needs the MMQ prompt path" and the prompt stays on the primary, as before.For reference: eddoursul/Strata's custom branch on the same box, same requests: 974 / 2,082 / 2,228 prompt tok/s.
Exactness
generatedoes not run the peer prompt share (set_peeris on the serve path), so we could not do a teacher-forced logit comparison.Not in this PR
DraftPolicy. That is reported separately (https://github.com/Niko1221/Strata/issues/1252) and the rule is left out.f4ee9b5idea) was tried and broke even on this box, so it is not included.Testing
-DSTRATA_MMQ_KQUANTS=ON. No warnings in the touched files.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.