Skip to content

GPU: keep patch indices on device - #9433

Draft
joseph-isaacs wants to merge 2 commits into
developfrom
joe/gpu-device-patch-indices
Draft

GPU: keep patch indices on device#9433
joseph-isaacs wants to merge 2 commits into
developfrom
joe/gpu-device-patch-indices

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

  • Preserve patch-index buffers in device memory through fused dispatch.
  • Consume them directly from CUDA kernels.
  • Remove the stream synchronization that existed only to materialize indices on the host.

Why this is needed

Patched BitPacked/ALP-style encodings are normal compressor output. The old fused path converted patch indices back to a host primitive and synchronized the stream before the consumer kernel, even though both producer and consumer are ordered on the same stream. Keeping indices in their device buffer removes that D2H boundary and the forced synchronization while preserving the same patch semantics.

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 14.03%

⚠️ 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.

❌ 7 regressed benchmarks
✅ 2036 untouched benchmarks
⏩ 46 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime cuda/alp_f64/10%[100M] 6.9 ms 8.4 ms -17.79%
WallTime cuda/alp_f32/0%[100M] 2.5 ms 2.9 ms -14.98%
WallTime cuda/alp_f64/1%[100M] 6.6 ms 7.7 ms -14.36%
WallTime cuda/alp_f32/1%[100M] 4.8 ms 5.6 ms -14.28%
WallTime cuda/alp_f32/10%[100M] 4.5 ms 5.1 ms -13.01%
WallTime words_gather_scalar[65536] 8.2 µs 9.4 µs -12.49%
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-device-patch-indices (67c9110) 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-decompression-profiling branch from cbfb3e5 to b5ac292 Compare August 17, 2026 09:14
@joseph-isaacs
joseph-isaacs force-pushed the joe/gpu-device-patch-indices branch from 171fc0f to 32e03e6 Compare August 17, 2026 09:15
@joseph-isaacs
joseph-isaacs changed the base branch from joe/gpu-decompression-profiling to claude/gpu-decompress-benchmarks-4mmn93 August 17, 2026 09:19
@joseph-isaacs
joseph-isaacs force-pushed the joe/gpu-device-patch-indices branch from 32e03e6 to 4117978 Compare August 17, 2026 12:42
@joseph-isaacs
joseph-isaacs changed the base branch from claude/gpu-decompress-benchmarks-4mmn93 to develop August 17, 2026 12:42
Signed-off-by: Joe Isaacs <2413449+joseph-isaacs@users.noreply.github.com>
Signed-off-by: Joe Isaacs <2413449+joseph-isaacs@users.noreply.github.com>
@joseph-isaacs
joseph-isaacs force-pushed the joe/gpu-device-patch-indices branch from 4117978 to 67c9110 Compare August 17, 2026 20:04
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