Repository navigation
Conversation
Upstream issue incoai#190. Default off, no behavior change.
ReplayState/DeferredReplay/onVerify with static_asserts. No new .metal: verify_gdn_fused* is the existing resolve target. Upstream issue incoai#190, PR incoai#198.
linson007
force-pushed
the
rfc/190-deferred-gdn
branch
from
October 21, 2026 18:16
a7ddcdd to
2159f78
Compare
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.
Feasibility review completed on 2026-10-23 against current main
3135ab45b3da525a8a2dbb8a1aa72ce095dda8a9.Closing this PR because its original optimization is already implemented by 48a94aaa. Main folds the previous step's retained GDN rows into the next fused decode, reads/writes the recurrent state once per step, and has removed the standalone commit dispatch. The current PR adds only
docs/rfc/190-deferred-gdn.md; its runtime, developer tools/tests, build file, server and installer trees are identical to its merge base. It therefore offers no incremental runtime performance improvement.The original scaffold is not a candidate to restore: it counted discarded rows (
proposed - accepted) instead of the retained prefix including the anchor. In the shipped implementation, even full retention leaves eight pending rows because the stored state precedes the current step. Marking it built or skipping those rows would violate the state/tape contract.Fresh local validation on Apple M5 Pro (20 GPU cores, 48 GB), macOS 26.6:
gdn-decode,gdn-metalandqwen-state-storageall pass withMTL_SHADER_VALIDATION=1, covering the existing recurrence, pending replay, batch changes and FP32/BF16 state paths.decode-profilecompletes for Qwen3.8-27B MLX 4-bit, INT8 KV, FP32 state, 2,048 prompt tokens, four cycles per width at B1-B4, without shader validation. It reports 48verify_gdn_fuseddispatches per decode cycle and noverify_gdn_commit. This is baseline attribution, not a new A/B speedup result.Further GDN arithmetic pruning would be a separate optimization. The existing experiment #511 already records passing correctness but no serving gain above its noise-adjusted promotion gate on this machine; that historical evidence was reviewed, not rerun here. This review does not establish that every possible GDN optimization is exhausted. No additional implementation or replacement PR is justified within #198's scope. Issue #190 is left unchanged.