Repository navigation
Conversation
lfm3_qk_segments runs lfm3_qk's body for each row of a shared round, reading the row's stream, cache length, capacity, keys and values from the attention table that lfm3_attn_segments already uses. A shared round now dispatches qk once per attention layer instead of once per stream. lfm3_qk keeps its bindings and arithmetic through the shared inline row function, so every row computes the same bytes at the same address. The contract registers the kernel and a planted control (every row reads stream 0's entry), with a probe whose replaced path is lfm3_qk stream by stream; the qk reference takes each row's position. An engine test compares queries, keys and values byte for byte against the per-stream dispatches.
…alls other streams' rounds LFM3's Metal backend gains prefill_step and cancel_prefill (#3021). Each call runs one chunk at exactly the whole pass's cuts (the chunk cap, the next planned start, the next kept mark); LFM3 declares no chunk invariance, so max_rows is ignored and the cuts never move. The whole pass and the steps share one chunk body, so replies are unchanged. A cancel keeps the state at the last chunk's end; a stream that leaves mid-pass is forgotten; image rows are prepared once, at the first call. The whole pass still yields at chunk starts as before. Host tests on recording fakes: stepped chunks equal the whole loop's, a resumed pass cuts as main does, a cancel keeps the last chunk's end, and another stream decodes between two chunks. The new step joins the macOS host CI list, and check-metal-prefill-rest-host compiles the new bodies.
Owner
Author
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.
CI for a landing train: #3079 #3088 stacked on main in that order. Nothing merges from this PR: each PR above lands on its own once this tip is green, and this PR is then closed.