Repository navigation
Fix output offsets in threaded complete reductions - #85
Merged
Merged
Conversation
Member
Author
|
macOS failure should be unrelated since that code is not touched here. Probably pre-existing on main after one of the upstream updates, it seems like the GPU kernel can't fully inline and therefore not compile, not sure if this is something we really can do a lot about |
Jutho
reviewed
Oct 7, 2026
| threadedout = similar(arrays[1], spacing * get_num_threads()) | ||
| a = arrays[1][ParentIndex(1)] | ||
| iout = ParentIndex(offsets[1] + 1) | ||
| a = arrays[1][iout] |
Member
There was a problem hiding this comment.
This was an actual bug? Interesting that it hadn't caused havoc yet.
Member
Author
There was a problem hiding this comment.
Yeah I'm also unclear where this came from, I can confirm it was a bug and failed before, but I also didn't bump into it myself 🤷
Jutho
approved these changes
Oct 7, 2026
Jutho
left a comment
Member
There was a problem hiding this comment.
Approved, but some tests with Metal arrays seem to be failing.
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
lkdvos
referenced
this pull request
Oct 8, 2026
* Skip layout planning for single-element arrays * Skip stride ranking when the memory estimate fits (#92) * Fix single-element GPU tests on Metal and CUDA The `map!` closure captured the loop variable `T`, which is not isbits and so cannot be passed to a GPU kernel; use `one(x)` instead. The in-place reduction check compared GPU and CPU `cos` results exactly, which can differ by an ulp; compare approximately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Respect the destination offset in threaded complete reductions and use the scratch buffer's own offset.
Regression tests pass with 1, 2, and 4 threads.