mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #513] [CLOSED] DeepSeek tensor parallel: a pipelined all-reduce for a group of two (MAYA_DS4_AR2, MAYA_DS4_AR2_DECODE) #569
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#569
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/mw00/project-maya/pull/513
Author: @pepuscz
Created: 10/26/2026
Status: ❌ Closed
Base:
main← Head:pr/ds4-up-c-ar2📝 Commits (10+)
001d578ds4: DS4_HC_FUSE - a decoded token's hc_split and hc_pre_norm in one launch, the attention input rounded therefddc0f2ds4: DS4_ROUTE_FUSE - a decoded token's router stage on the lead in two launches instead of four8e9e97bds4: DS4_ROUTE_FUSE - nothing published after a launch that did not go in; one eligibility check before any enqueue4182dd3ds4: DS4_AR2_DECODE - the decode windows' all-reduces in ar2_kernel's exact mode94e6547docs: a group of two's all-reduces in one pipelined launch - MAYA_DS4_AR2 and MAYA_DS4_AR2_DECODE4b335ffds4: DS4_HC_FUSE=2 - the HC split + norm fuse for a decode window's rows too (parked, not built)aced0d1ds4: DS4_HC_FUSE=2 - the FFN's split rounds its input too, for the shared expert's w1 / w3ed02cf0ds4: DS4_ROUTE_FUSE=2 - the fused router stage for a decode window's rows tooaab71b9docs: DeepSeek's fused decode launches - MAYA_DS4_HC_FUSE and MAYA_DS4_ROUTE_FUSEbcd24b2ds4: DS4_DECODE_TRIM - the decode's last four small trims, each exact and checked at load📊 Changes
7 files changed (+2045 additions, -55 deletions)
View changed files
📝
docs/SETTINGS.md(+40 -0)📝
src/ds4/ds4_gguf.cu(+18 -2)📝
src/ds4/ds4_gguf.cuh(+14 -0)📝
src/ds4/ds4_kernels.cu(+434 -0)📝
src/ds4/ds4_kernels.cuh(+76 -0)📝
src/ds4/ds4_model.cu(+1342 -52)📝
tests/ds4_gguf_test.cu(+121 -1)📄 Description
Part of #510 (PR C of 9: A, B, C, C2, D, E, F, G, H). Stacked on #512: until that merges, this PR also shows its commits; this PR's own are the last ones listed. Glad to rebase as
mainmoves.What. A group of two's chunk all-reduces (the attention output's and the MoE's) put the partial, wait, then sum in separate steps. Over PCIe 4.0 x4 links that wait is most of the all-reduce.
Change. Opt-in, for a group of exactly two with host-mapped flags:
MAYA_DS4_AR2=1:ar2_kernelpipelines the put and the sums in pieces, reading the other member's rows 16 bytes a lane; the sums arear_sum_kernel's, bit for bit.MAYA_DS4_AR2=2: the same with FP16 on the wire (both partials rounded, summed in F32 in member order). Not exact, a prompt-speed option only; decode never takes it.MAYA_DS4_AR2_DECODE=1: the decode windows' all-reduces throughar2_kernelin its exact mode.Checks.
ds4_gguf_test --ar <dev> <dev> [rows]compares both modes against the old all-reduce (0 and 1 bit for bit, 2 against the host's FP16-rounded sum) and times them.Tested on one box, 2x RX 7900 XTX (gfx1100) + Radeon 8060S (gfx1151), HIP: this PR's head builds on its own (each PR of the series was built in order), and the full series passed its load checks and
--bench(numbers in #510). Not built or run on CUDA.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.