Skip to content

feat(cuda): prefer standalone kernels in auto mode#7667

Merged
0ax1 merged 1 commit intodevelopfrom
ad/dyn-disp-prefer-standalone
Apr 28, 2026
Merged

feat(cuda): prefer standalone kernels in auto mode#7667
0ax1 merged 1 commit intodevelopfrom
ad/dyn-disp-prefer-standalone

Conversation

@0ax1
Copy link
Copy Markdown
Contributor

@0ax1 0ax1 commented Apr 27, 2026

In auto dispatch mode, try_gpu_dispatch now checks has_standalone_kernel before the dynamic-dispatch plan builder.

Standalone kernels are preferred when they can decode the entire tree in a single launch without recursing into execute_cuda for child encodings.

@0ax1 0ax1 added the changelog/feature A new feature label Apr 27, 2026
@0ax1 0ax1 requested review from a10y and robert3005 April 27, 2026 10:26
@0ax1 0ax1 changed the title feat(cuda): prefer standalone kernels if possible feat(cuda): prefer standalone kernels in auto mode Apr 27, 2026
In Auto dispatch mode, try_gpu_dispatch now checks `has_standalone_kernel`
before the dynamic-dispatch plan builder.

Standalone kernels are preferred when they can decode the entire tree in
a single launch without recursing into execute_cuda for child encodings.

Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
@0ax1 0ax1 force-pushed the ad/dyn-disp-prefer-standalone branch from 9b6a754 to 27ea9a5 Compare April 27, 2026 10:54
/// Returns `true` if a registered standalone kernel can decode the entire
/// `array` tree in a single launch without recursing into `execute_cuda`
/// for child encodings.
pub fn has_standalone_kernel(array: &ArrayRef) -> bool {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in theory this should probably examine the session right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we could but for some kernels, like dict, we def want to prefer dynamic dispatch. Part of this is that we only want to call the standalone kernel if it can decompress the whole tree.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth considering whether we should remove dict, and runend maybe as standalone kernels.

@0ax1 0ax1 merged commit 6608a71 into develop Apr 28, 2026
71 of 77 checks passed
@0ax1 0ax1 deleted the ad/dyn-disp-prefer-standalone branch April 28, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants