Skip to content

Deprecate split_kwargs and assign_args! - #1142

Merged
maleadt merged 2 commits into
mainfrom
tb/kwargs-splat
Dec 3, 2026
Merged

maleadt merged 2 commits into
mainfrom
tb/kwargs-splat

Conversation

@maleadt

@maleadt maleadt commented Dec 2, 2026

Copy link
Copy Markdown
Member

split_kwargs and assign_args! are helpers for back-ends' launch macros (@cuda, @metal, ...). They have nothing to do with compilation, and they route keyword arguments by name at macro expansion time, which rules out splatted keyword arguments (@cuda config... kernel(a)).

GPUToolbox 3.8 has their replacements, parse_launch_macro and partition_kwargs (JuliaGPU/GPUToolbox.jl#48), which support splats and partition keyword arguments into NamedTuples at run time.

This moves the two helpers to deprecated.jl, unchanged and still exported. Released back-ends use them, so they don't warn; they can be removed in the next breaking release, once the back-ends have moved over. They are dropped from the precompile workload, and the test helpers use partition_kwargs, which adds GPUToolbox as a test dependency.

These helpers for back-ends' launch macros are superseded by
GPUToolbox's `parse_launch_macro` and `partition_kwargs`, which support
splatted keyword arguments and partition keyword arguments into
`NamedTuple`s at run time, also for code that isn't a macro. They don't
belong in GPUCompiler either, as they have nothing to do with
compilation.

Move them to deprecated.jl. They keep working and don't warn, as
released back-ends use them. Remove them from the precompile workload,
and use `partition_kwargs` in the test helpers.
@maleadt
maleadt merged commit 3b7a5ff into main Dec 3, 2026
41 of 45 checks passed
@maleadt
maleadt deleted the tb/kwargs-splat branch December 3, 2026 05:33
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