Repository navigation
Conversation
…locator` `tensoralloc` only advanced `buffer.offset` for temporaries that fit, so later requests in the same pass started from too low an offset and `max_offset` underestimated the peak. The buffer then kept growing by a sliver on many consecutive passes, each time reallocating the whole buffer. Advancing the offset on overflow as well makes `max_offset` exact after a single pass, so a repeated allocation pattern converges after one warm-up pass and the buffer is never reallocated afterwards. The JLArray tests define pointer-based `dataids` for `JLArray`, as `CuArray` and `ROCArray` do: with a warm buffer, disjoint temporaries share its storage and were otherwise falsely reported as aliased. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
This was referenced Oct 5, 2026
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.
This is a small fix for a subtle mistake I made where the buffer offset is not increased when it overflows and has to allocate. The reason I did that originally was that I felt like that way the remaining space might still be used for subsequent contractions, but in hindsight this is probably a bit of a mistake, since that means that the sizehint will only slowly increase.
For example, if I have a capacity of 10, and then allocate 100 times a size-100 vector and then reset, the buffer will resize to 10+100 the first time, and repeating this to 110+100, etc. Instead here, we keep track of what the total usage was, and will immediately resize to 10+100*100.