Skip to content

Conversation

@christiangnrd
Copy link
Member

@christiangnrd christiangnrd commented May 21, 2025

I'll give a better title once this isn't a prototype, but this is the fix I suggested in #37.

I split it into two commits: The first to fix the actual issue reported, and the second goes over the rest of accumulate as a proof-of-concept.

If this is approved, I can go over the whole package and simplify the the rest. This would probably allow us to remove the cumsum and cumprod definitions in the Metal extension. I did it anyway. See #39

Also remove redundant `kwarg=kwarg` definitions for `accumulate`
All defaults removed in this commit are always overridden by the arguments passed in from `accumulate_impl!`. This removes any confusion of where a certain argument would have come from
@christiangnrd
Copy link
Member Author

@anicusan I rebased for 0.4, and I removed some default argument definitions for the deep implementation functions that would never be used and probably just add confusion.

I've also added tests (for accumulate only in this PR) to ensure that invalid kwargs error.

@anicusan
Copy link
Member

This is great, thanks @christiangnrd ! The "opinionated cleanup" is also fantastic. Big fan of the test_throws for badly-named kwargs too

@anicusan anicusan merged commit 55eb6a4 into JuliaGPU:main May 26, 2025
37 of 38 checks passed
@christiangnrd christiangnrd deleted the kwargs branch May 26, 2025 13:27
@christiangnrd
Copy link
Member Author

Thank you! Would you be able to bump to 0.4.1 with this since it’s a also a bugfix?

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.

2 participants