Skip to content

GPU: fuse dictionaries with nullable codes - #9435

Draft
joseph-isaacs wants to merge 1 commit into
developfrom
joe/gpu-nullable-dictionary-dispatch
Draft

GPU: fuse dictionaries with nullable codes#9435
joseph-isaacs wants to merge 1 commit into
developfrom
joe/gpu-nullable-dictionary-dispatch

Conversation

@joseph-isaacs

@joseph-isaacs joseph-isaacs commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Independent of the other follow-up PRs; based directly on #9147. This draft contains one reviewable GPU correctness or performance concern.

What

  • Pass dictionary length into the fused dispatch plan.
  • Bounds-check unspecified physical codes at null positions in the CUDA gather.
  • Keep validity propagation separate and enable fusion for nullable codes.

Why this is needed

This is not required by the current BtrBlocks GPU benchmark path. Vortex's normal DictEncoder intentionally stores nulls in the dictionary values so generated codes remain non-null. Nullable codes are nevertheless legal for externally supplied or transformed DictArray values; their physical null slots may contain arbitrary/out-of-range bits, so the bounds check is needed if CUDA claims support for that legal representation.

Recommendation: keep this as an independent general CUDA compatibility PR only if that scope is wanted; otherwise close/defer it rather than presenting it as a benchmark optimization.

Validation

Checked independently against this PR's current base:

  • cargo check -p vortex-cuda --all-features

The combined implementation also passed Rust/CUDA formatting, 164 focused dynamic-dispatch tests, and 28 focused constant-array tests.

@codspeed-hq

codspeed-hq Bot commented Aug 17, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 11.76%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

❌ 2 regressed benchmarks
✅ 2041 untouched benchmarks
⏩ 46 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime words_gather_scalar[65536] 8.2 µs 9.4 µs -12.4%
WallTime words_gather_dispatch[1024] 8 ns 9 ns -11.11%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing joe/gpu-nullable-dictionary-dispatch (55cf62c) with develop (b825c4f)

Open in CodSpeed

Footnotes

  1. 46 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@joseph-isaacs
joseph-isaacs force-pushed the joe/gpu-flat-constant-arrays branch from e271be1 to 1338a6a Compare August 17, 2026 09:15
@joseph-isaacs
joseph-isaacs force-pushed the joe/gpu-nullable-dictionary-dispatch branch from e04e1fa to bf50ff8 Compare August 17, 2026 09:16
@joseph-isaacs
joseph-isaacs changed the base branch from joe/gpu-flat-constant-arrays to claude/gpu-decompress-benchmarks-4mmn93 August 17, 2026 09:20
@joseph-isaacs
joseph-isaacs force-pushed the joe/gpu-nullable-dictionary-dispatch branch from bf50ff8 to 6dcb661 Compare August 17, 2026 12:44
@joseph-isaacs
joseph-isaacs changed the base branch from claude/gpu-decompress-benchmarks-4mmn93 to develop August 17, 2026 12:44
Signed-off-by: Joe Isaacs <2413449+joseph-isaacs@users.noreply.github.com>
@joseph-isaacs
joseph-isaacs force-pushed the joe/gpu-nullable-dictionary-dispatch branch from 6dcb661 to 55cf62c Compare August 17, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant