Repository navigation
qwen27 Metal prompts: drop the GDN tails buffer nothing reads (#2905) - #2915
Merged
Merged
Conversation
Owner
Author
|
Checked on an M5 Ultra, Qwen3.8-27B MLX 4-bit, served, against main
Small, but exact and consistent, since the GDN tails buffer nothing read is no longer written. Queued to land.
|
This was referenced Nov 13, 2026
ashhart
force-pushed
the
lead/q27-gdn-tails
branch
from
November 13, 2026 09:40
b2c20c6 to
ea6c930
Compare
ashhart
added a commit
that referenced
this pull request
Nov 13, 2026
Figures and scope corrected to the PRs (#2948, #2863, #2934, #2933, #2921, #2906, #2878, #2892, #2851, #2728, #3072, #2915, #2864, #2854 and others), promises of later work removed (#2903, #2875, #1630, #1720), #3074 and #3047/#3046 said as their PRs scope them, the duplicate #2861, #2585, #2321 and #2719 entries and two copies of released 1.2.5 lines removed, #1953's line named for its PR, and a line for #3255. Released sections unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2905.
In a prompt pass,
tf_delta_gdn_prestored every row's conv tail into atailsbuffer (buffer(15)) that nothing reads. The conv commit takes the window it needs from the history it writes as it goes. This drops the store loop, the binding, the pool allocation and scratch share, and the contract's byte field. Arithmetic, store order, launch geometry and barriers are unchanged.At 2,048 rows on the 27B: 3 × 10,240 × 2 × 2,048 = 125,829,120 bytes (120 MiB) less scratch.
Tests: the 2,048-row GDN budget test and the contract byte test fail against unchanged main and pass here (eleven remaining allocations pinned). qwen27 host 589/590 (1 skipped). The runtime GDN source compiles offline.
Not yet checked on a device:
--compare-chunkand served greedy/seeded replies byte-equal on an M5 and an M3, and a short A/B (expected +0.2-0.5% on cold 8K-32K prompts on an M5).