Skip to content

Back @private with KernelAbstractions' PrivateArray - #657

Closed
maleadt wants to merge 2 commits into
ka-0.10from
tb/private-array
Closed

maleadt wants to merge 2 commits into
ka-0.10from
tb/private-array

Conversation

@maleadt

@maleadt maleadt commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Use KernelAbstractions' new PrivateArray (JuliaGPU/KernelAbstractions.jl#843) for @private instead of a StaticArrays MArray. An MArray that is passed to a function that isn't inlined is heap-allocated; PrivateArray is a stack allocation that otherwise performs like the MArray. See JuliaGPU/KernelAbstractions.jl#843 for numbers. This drops the StaticArrays dependency.

The [TEMP] commit points the tests at the KernelAbstractions branch; drop it once JuliaGPU/KernelAbstractions.jl#843 is merged.

The MArray returned from `Scratchpad` is heap-allocated when passed to a
function that isn't inlined. KernelAbstractions' PrivateArray is a stack
allocation that otherwise performs like the MArray, and lets us drop the
StaticArrays dependency.
Drop this commit once that PR is merged.
@maleadt
maleadt added this pull request to stack #658 October 5, 2026 20:57
@maleadt maleadt closed this Oct 6, 2026
@maleadt
maleadt removed this pull request from stack #658 October 10, 2026 17:48
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