Skip to content

feat[gpu]: slice support for CUDA dyn dispatch#6705

Draft
0ax1 wants to merge 1 commit intodevelopfrom
ad/dyn-dispatch-slice
Draft

feat[gpu]: slice support for CUDA dyn dispatch#6705
0ax1 wants to merge 1 commit intodevelopfrom
ad/dyn-dispatch-slice

Conversation

@0ax1
Copy link
Contributor

@0ax1 0ax1 commented Feb 27, 2026

Introduce slice support for the CUDA dyn dispatch kernel. As part of that, The bitpacking SliceKernel is replaced with SliceReduce.

Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
@0ax1
Copy link
Contributor Author

0ax1 commented Feb 27, 2026

(On that note: I think all remaining SliceKernel in vortex codebase can with SliceReduce => separate PR)

@0ax1 0ax1 requested review from a10y and robert3005 February 27, 2026 12:55
@0ax1 0ax1 added the changelog/feature A new feature label Feb 27, 2026
@0ax1 0ax1 enabled auto-merge (squash) February 27, 2026 13:02
@0ax1 0ax1 force-pushed the ad/dyn-dispatch-slice branch 2 times, most recently from db5ead6 to a6411c1 Compare February 27, 2026 13:12
///
/// **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> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

}

/// Returns the adjusted device pointer accounting for the offset.
pub fn offset_ptr(&self) -> sys::CUdeviceptr {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

device_ptr is private, there's no public API anymore to get a device pointer without an offset.

@0ax1 0ax1 requested a review from onursatici February 27, 2026 14:03
@0ax1 0ax1 disabled auto-merge February 27, 2026 14:17
@0ax1 0ax1 marked this pull request as draft February 27, 2026 14:26
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.

1 participant