WIP: Interleave modular transform processing#796
Draft
hjanuschka wants to merge 6 commits into
Draft
Conversation
Member
|
I had a different approach in mind that might be simpler and more effective during progressive renders. I will give that some thought and hopefully write something up in the next day or two :-) |
Only retain progressive render snapshots in the CLI when they can be written to an output.
Inverse squeeze steps read neighbor grids (next average and previous decoded) that the transform graph counts as buffer uses, but the per-step code never released them, so those intermediate modular buffers stayed allocated for the whole frame. Mark them used on the final render so they are freed once consumed.
Modular frames never reclaim center group buffers via get_buffer, so the scratch pool grew to a full-frame copy that was retained for the pipeline's lifetime. Cap it to the few buffers sequential rendering can actually reuse.
Run safe gridded modular transforms during decode so large lossless frames can free squeeze intermediates as soon as their dependencies are ready.
This reverts commit 6489571.
Avoid retaining modular center group buffers while interleaved processing is feeding the low-memory pipeline, without changing the normal scratch-buffer reuse path.
35bbb98 to
a42d5b2
Compare
veluca93
reviewed
Jun 10, 2026
veluca93
left a comment
Member
There was a problem hiding this comment.
approving for benchmark purposes ;-)
veluca93
approved these changes
Jun 10, 2026
Member
Performance Summary (Commit
|
| Machine | Threading | Base MP/s | PR MP/s | Avg Improvement |
|---|
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.
WIP follow-up to #795.
This tries the deeper path for #782: for safe gridded Modular frames, decode a group and immediately run any modular transforms that became ready, instead of decoding all groups before transform processing. This lets large squeeze images free intermediates during decode.
The optimization is gated to straight non-flush Modular decodes, before any flush happened, gridded outputs, and sufficiently tiled frames. Flush/progressive and small-frame paths keep the existing batched behavior.
Peak RSS on the repro:
This avoids the global scratch-pool cap from #795 by only skipping center-buffer caching while interleaved modular output is actively feeding the low-memory pipeline. Normal scratch-buffer reuse is left unchanged.