Repository navigation
Invalidations 6/6 (WIP): stop re-reading chunks in column-major iteration - #344
Draft
asinghvi17 wants to merge 1 commit into
Draft
asinghvi17 wants to merge 1 commit into
asinghvi17 wants to merge 1 commit into
Conversation
Iteration read blocks of whole dimensions before `k`, chunk ranges along `k` and single indices after it, with `k` the last dimension whose chunk strip fits in `default_chunk_size`. When the strip of the next dimension did not fit, every chunk was read once per index it spans after `k`: a 36000 x 18000 Float32 array in 1024 x 1024 chunks took 648,000 reads, each chunk read 1024 times. Now `k` is the first dimension that does not fit whole after the ones before it, and chunks along `k` are split into equal pieces only when one does not fit beside them. That array takes 2 reads per chunk. A block is filled one chunk at a time, when iteration reaches the chunk's first value, so `readblock!` calls match chunk-order iteration, and stopping early reads only the chunks reached. The budget is at least one chunk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Dfq6aDr3GqA8w61TsvMsc
asinghvi17
added this pull request to stack #342
October 8, 2026 15:41
This branch has not been deployed
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.
🚧 Under development, not ready for review. Part 6/6, on #343.
An experiment to stop #343 re-reading chunks. When a slab of chunks exceeds
default_chunk_size, it reads the whole leading dimension and splits chunks along the next one, instead of reading single columns.This still buffers a slab of chunks and still re-reads some shapes, so the approach is likely to be replaced by one that reads one chunk at a time.
🤖 Generated with Claude Code
https://claude.ai/code/session_019Dfq6aDr3GqA8w61TsvMsc