feat(cuda): prefer standalone kernels in auto mode#7667
Merged
Conversation
auto mode
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>
9b6a754 to
27ea9a5
Compare
a10y
reviewed
Apr 27, 2026
| /// 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 { |
Contributor
There was a problem hiding this comment.
in theory this should probably examine the session right?
Contributor
Author
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
Probably worth considering whether we should remove dict, and runend maybe as standalone kernels.
joseph-isaacs
approved these changes
Apr 27, 2026
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.
In
autodispatch mode,try_gpu_dispatchnow checkshas_standalone_kernelbefore the dynamic-dispatch plan builder.Standalone kernels are preferred when they can decode the entire tree in a single launch without recursing into
execute_cudafor child encodings.