Repository navigation
qwen3_5 CUDA: served one-row steps skip the rollback copy nothing reads (#2908) - #2933
Merged
Merged
Conversation
Owner
Author
|
GB10 checks on this head (Qwen3.8-27B MLX 4-bit, main against this PR, base new new base):
Tokens are equal, and the chat cell (four serial turns and two concurrent ones over a 30k-token history, thinking off and on) resumes from the prompt cache with every reply equal on both arms. CI is green. Queued to land. If #2620 lands first, its
|
ashhart
force-pushed
the
lead/q35-cuda-no-rollback-copy
branch
from
November 13, 2026 00:30
0025dc9 to
2c9dfbc
Compare
ashhart
added a commit
that referenced
this pull request
Nov 13, 2026
This was referenced Nov 13, 2026
A recorded one-row step copied each stream's whole GDN state and conv tail for a keep of no rows, and served traffic never keeps one. Part now carries undo (default on, so warm-up, qualification and host tests keep their copy); the served queue and verify parts set it only while learning. With undo off the staged segment reads no before, recurrent.prepare leases no copy, and the two kernels skip only their copy: the conv tail's in-place update still runs. An empty keep after such a step refuses with QwenNoRollbackCopy rather than restoring bytes the step never wrote. Host: qwen35 shared, cache, pending, rounds, verify, live, prefill and the recurrent workspace steps pass; compile-cuda-tests for Linux compiles.
ashhart
force-pushed
the
lead/q35-cuda-no-rollback-copy
branch
from
November 13, 2026 16:34
1e2bda6 to
ba93b03
Compare
ashhart
added a commit
that referenced
this pull request
Nov 13, 2026
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 #2908.
On CUDA, every recorded one-row Qwen 3.5/3.6/3.8 step copied each stream's whole pre-step GatedDeltaNet state to
before(about 151 MB a stream a step for the 27B), andtf_q35_conv_commitcopied the conv tail. On served traffic nothing reads them: onlykeep(path = [])after a one-row window does, and served paths never keep an empty path.Part.undo(default true, so warm-up, qualification and host tests are unchanged). Served queue and verify parts set it only while learning (cuda_native.zig).beforeis 0 and no copy is leased (cuda_recurrent.zig).qwen35_slots.cuh,qwen35.cu). The conv tail's in-place update still runs on every one-row step. Skipping that update as well would change tokens, so the guard covers the copy alone.keep(&.{})after a step without a copy refuses withQwenNoRollbackCopyinstead of restoring stale bytes.Exact: nothing reads the skipped bytes.
Tests: host tests on the fake engine. A served-style one-row step stages
before = 0and leases no copy,keep(&.{0})lands it, andkeep(&.{})refuses. Withundo = truethe existing tests are unchanged.Not yet checked on a GB10: the keep-harness byte test, served greedy and seeded replies byte-equal to main, and the A/B (expected +2-3.5% at four streams, +0.5-1% at one). Note for #2620: it includes the same kernel sources, so this guard carries into its
_tablebuilds.