feat(cuda): add a FastLanes delta decode kernel - #9535
Open
joseph-isaacs wants to merge 2 commits into
Open
Conversation
joseph-isaacs
had a problem deploying
to
duckdb-build
August 21, 2026 13:07 — with
GitHub Actions
Error
joseph-isaacs
had a problem deploying
to
duckdb-build
August 21, 2026 13:07 — with
GitHub Actions
Error
joseph-isaacs
had a problem deploying
to
duckdb-build
August 21, 2026 13:07 — with
GitHub Actions
Error
vortex.onpair emits fastlanes.delta children, and decoding one on the GPU failed with "No CUDA kernel for encoding Id(\"fastlanes.delta\")". Because the buffers are device-resident by then, there is no CPU fallback: the whole decode fails. Delta is not the sequential prefix sum it appears to be. FastLanes stores each 1024-element chunk as LANES independent columns, each with its own running total seeded from that lane's base, so a chunk decodes as LANES independent scans and the array is data-parallel across both chunks and lanes. One thread owns one lane, mirroring how the CPU decoder uses one SIMD lane per column, and fastlanes_common.cuh already carries the index math. The kernel mirrors delta_decompress: undelta into the transposed layout staged in shared memory, untranspose into natural order, then apply the logical slice. Signed values decode through their unsigned counterpart, so the wrapping add inverts the wrapping subtract done at compress time. only_cuda_compatible() still excludes DeltaScheme: that preset chooses encodings rather than merely decoding them, so flipping it should follow a benchmark of GPU delta decode against the schemes it would displace. Its comment is updated, since the "no GPU decode kernel" rationale no longer holds. Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
joseph-isaacs
force-pushed
the
ji/cuda-delta-kernel
branch
from
August 21, 2026 13:31
2521d16 to
a91e43d
Compare
joseph-isaacs
had a problem deploying
to
duckdb-build
August 21, 2026 13:31 — with
GitHub Actions
Error
joseph-isaacs
requested a deployment
to
duckdb-build
August 21, 2026 13:31 — with
GitHub Actions
Waiting
joseph-isaacs
had a problem deploying
to
duckdb-build
August 21, 2026 13:31 — with
GitHub Actions
Error
Merging this PR will not alter performance
|
The delta kernel had tests but no benchmark, so its throughput was unmeasured and no regression would be caught. Cover each element width separately: the lane count is 1024 / bit-width, so the width sets both how a chunk splits — 128 lanes of 8 rows for u8 through 16 lanes of 64 rows for u64 — and how much of a block is busy during the scan. The CUDA CodSpeed shards enumerate their benches explicitly, so delta_cuda is added to shard 3 alongside the other standalone kernels; without that the bench would build but never run. Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
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.
Rationale for this change
fastlanes.deltaGPU kernels are missing