Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in tensoralloc for Bumper allocator #188

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

leburgel
Copy link
Contributor

@leburgel leburgel commented Oct 2, 2024

Fixes what I think is a typo in the Bumper allocator. I assume this was supposed to be an ndims check to flag zero-dimensional arrays, but I think there were some parentheses missing which made it so that temporary arrays of rank<4 were never actually allocated in the buffer.

Or I'm missing something, but the patch seems to fix leaking allocations on my end and the tests still pass. @lkdvos

Copy link
Collaborator

@lkdvos lkdvos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does indeed look like a typo... If I'm not mistaken I intended it to be &&, which seemingly has different precedence rules than & for some reason. Could you check if that also fixes it?

Edit: only now saw @Jutho s reply

Copy link

codecov bot commented Oct 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.77%. Comparing base (455a69f) to head (efe4659).
Report is 27 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #188      +/-   ##
==========================================
- Coverage   83.06%   82.77%   -0.30%     
==========================================
  Files          25       28       +3     
  Lines        2150     2456     +306     
==========================================
+ Hits         1786     2033     +247     
- Misses        364      423      +59     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leburgel
Copy link
Contributor Author

leburgel commented Oct 2, 2024

That does indeed look like a typo... If I'm not mistaken I intended it to be &&, which seemingly has different precedence rules than & for some reason. Could you check if that also fixes it?

Yes, this also fixes it, so changed the fix to && here.

@leburgel leburgel changed the title Fix typo(?) in tensoralloc for Bumper allocator Fix typo in tensoralloc for Bumper allocator Oct 2, 2024
@Jutho
Copy link
Owner

Jutho commented Oct 2, 2024

I'll merge. I thought this was a good time to check whether the second part of the if clause was still necessary, but it seems the issue in StrideArraysCore.jl is still open:
JuliaSIMD/StrideArraysCore.jl#28

@Jutho Jutho merged commit c1e37ec into Jutho:master Oct 2, 2024
16 of 17 checks passed
@leburgel leburgel deleted the leburgel/bumper_fix branch October 2, 2024 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants