Repository navigation
Fast FastLanes Delta: fused decode, SIMD transposes, probe, filter, take and is_constant kernels - #11428
Merged
Conversation
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.
Summary
FastLanes Delta decoded slowly and had almost no compute kernels: every filter, take,
scalar_atoris_constantdecoded the whole array first. Vortex now has the APIs this needs (the probe API and execute kernels). This PR uses them, together with fastlanes 0.8.0's fused unpack-and-undelta and SIMD transpose kernels, so Delta is cheap enough to select by default.Changes
Decode
Delta(BitPacked)decodes each 1024-value chunk with fastlanes' fusedunchecked_undelta_pack. The deltas are no longer unpacked into a full intermediate array. This covers patched and block-width bit-packing.fearless_simd: AVX-512 for 8- and 16-bit values; for 32- and 64-bit values, fastlanes' own dispatch, because AVX-512 is slower there on Zen 4.DeltaChunksis a reusable chunk decoder with scratch space. The kernels below share it.Kernels
scalar_atdecodes only the chunk holding the row. A repeated probe caches the last decoded chunk.is_constantreads only the stored parts where it can: all-null, mixed-null, or all-zero interior deltas plus constant bases. Only the partial chunks at either end of a slice are decoded.take_chunks.rsis shared between BitPacked and Delta.Compression
delta_compressused to carry the previous chunk's last value into a chunk that starts with nulls. Values that restart in every chunk, such as RLE indices, then got wrapping residuals, and the compressor rejected Delta for them. Those leading nulls now take the chunk's first valid value.RLE(indices = RunEnd(ends = Delta)), which every decode and filter expands twice. This enables the exclusion that had been commented out.