feat[gpu]: slice support for CUDA dyn dispatch#6705
Draft
Conversation
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Contributor
Author
|
(On that note: I think all remaining |
db5ead6 to
a6411c1
Compare
0ax1
commented
Feb 27, 2026
| /// | ||
| /// **IMPORTANT**: this is a byte range, not elements range, due to the DeviceBuffer interface. | ||
| /// This is a byte range, not elements range, due to the DeviceBuffer interface. | ||
| fn slice(&self, range: Range<usize>) -> Arc<dyn DeviceBuffer> { |
Contributor
Author
There was a problem hiding this comment.
In some way I think this fn shouldn't exist on the API. Device pointers should always be passed sliced to GPU, with the offset being applied to the device ptr. Encodings that don't support element wise slicing like bitpacking use an extra offset parameter to locate them in the FL block.
0ax1
commented
Feb 27, 2026
| } | ||
|
|
||
| /// Returns the adjusted device pointer accounting for the offset. | ||
| pub fn offset_ptr(&self) -> sys::CUdeviceptr { |
Contributor
Author
There was a problem hiding this comment.
device_ptr is private, there's no public API anymore to get a device pointer without an offset.
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.
Introduce slice support for the CUDA dyn dispatch kernel. As part of that, The bitpacking
SliceKernelis replaced withSliceReduce.