Repository navigation
memory allocation size accuracy fix - #1377
Merged
biochem-fan merged 1 commit intoOct 15, 2026
Merged
Conversation
Member
|
Thank you very much. I merged an earlier PR #1375 that had the same fix. Your PR contains another fix about memory alignment. |
bwlang
force-pushed
the
fix/gpu-allocator-stale-free-state
branch
from
October 15, 2026 11:07
a0580bb to
18bea71
Compare
Contributor
Author
|
I've rebased... This PR is now a "correctness" fix... i didn't test it separately from the #1375 parallel fix though so I'm not sure of often it bites in practice. Allocations above 16MB will round incorrectly I think, leading to a too small allocation and potential writes past the end of the allocated region if the entire block is used. |
Member
|
OK, I understood the logic. float32 has 9 exponent bits and 23 fraction bits and 16 MB = 2^(23 + 1). So beyond 16 MB some lower bits are rounded. I agree with your point. I merge this. Thank you very much. |
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.
without this fix i was seeing GPU runs crashing with errors like these:
with this fix it's working.