Skip to content

Fix error when reducing multiple axes if reduced chunks are non-contiguous #660

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

Merged
merged 1 commit into from
Apr 12, 2025

Conversation

robertknight
Copy link
Owner

Fix a bounds check error when slicing tmp_buf if multiple axes are reduced and the reduced slices are non-contiguous. In this case the code expected capacity to have been reserved in tmp_buf but it was actually empty. Change how the buffer is allocated to ensure it is always allocated when needed.

@robertknight robertknight force-pushed the fix-reduce-multiple-axes branch from f4b280b to 03fe119 Compare April 12, 2025 05:56
…guous

Fix a bounds check error when slicing `tmp_buf` if:

 - The input is contiguous
 - Multiple axes are reduced
 - The reduced slices are non-contiguous

In this case the code expected capacity to have been reserved in `tmp_buf` but
it was actually empty. Change how the buffer is allocated to ensure it is always
allocated when needed.
@robertknight robertknight force-pushed the fix-reduce-multiple-axes branch from 03fe119 to 3e20ff7 Compare April 12, 2025 06:00
@robertknight robertknight merged commit a6fe23a into main Apr 12, 2025
2 checks passed
@robertknight robertknight deleted the fix-reduce-multiple-axes branch April 12, 2025 06:30
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.

1 participant