Skip to content

feat: add a ci gpu compress benchmark - #8951

Open
joseph-isaacs wants to merge 6 commits into
developfrom
ji/gpu-decompress
Open

feat: add a ci gpu compress benchmark#8951
joseph-isaacs wants to merge 6 commits into
developfrom
ji/gpu-decompress

Conversation

@joseph-isaacs

@joseph-isaacs joseph-isaacs commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Adds a bench-compression GPU variant.

Currently this fails to run. But we can fix that outside of adding the bench.

Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

GPU Compression

┌───────────────────────────────────────────┬────────────────────────┐
│ Benchmark                                 │ vortex-file-compressed │
├───────────────────────────────────────────┼────────────────────────┤
│ decompress time/TPC-H l_comment canonical │ 1676335.00 μs (1.00)   │
└───────────────────────────────────────────┴────────────────────────┘

Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
@codspeed-hq

codspeed-hq Bot commented Jul 24, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 17.18%

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

⚡ 1 improved benchmark
✅ 1891 untouched benchmarks
⏩ 3 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime cuda/bitpacked_u8/unpack/3bw[100M] 351.5 µs 299.9 µs +17.18%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing ji/gpu-decompress (f729318) with develop (b15394a)

Open in CodSpeed

Footnotes

  1. 3 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.

Comment thread benchmarks/compress-bench/src/gpu_vortex.rs
Comment thread benchmarks/compress-bench/src/gpu_vortex.rs Outdated
@joseph-isaacs
joseph-isaacs marked this pull request as ready for review July 24, 2026 15:26
Use direct I/O for the pooled CUDA data-plane reads and black-box the
canonicalized batches so the decompression work cannot be optimized away.

Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WPDxwLypj71WvC9zfusx86
@joseph-isaacs
joseph-isaacs requested a review from robert3005 July 24, 2026 16:08
@joseph-isaacs
joseph-isaacs enabled auto-merge (squash) July 24, 2026 16:08
The GPU compression benchmark failed at runtime with:

  GPU execution for encoding vortex.fsst failed
   (GPU execution for encoding vortex.patched failed
    (No CUDA kernel for encoding vortex.patched))

VORTEX_EXPERIMENTAL_PATCHED_ARRAY=1 rewrites interior `Patches` into a
top-level `vortex.patched` array. That encoding has no registered CUDA
decode kernel, so GPU decompression of FSST-coded columns (whose codes are
bitpacked with patches) aborts. Removing the flag keeps patches inline in
the bitpacked array, which the CUDA bitpacked kernel decodes. This matches
the GPU test workflow (cuda.yaml), which sets only FLAT_LAYOUT_INLINE_ARRAY_NODE.

Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
@joseph-isaacs
joseph-isaacs requested a review from 0ax1 July 27, 2026 13:26
@0ax1
0ax1 disabled auto-merge July 27, 2026 16:08

@0ax1 0ax1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm. disabled auto-merge and left some nits.

- name: Build GPU compression benchmark
shell: bash
run: |
cargo build --locked --package compress-bench --profile release_debug \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: all in one or one flag per line

repo-token: ${{ secrets.GITHUB_TOKEN }}
enable-sccache: "true"
- uses: ./.github/actions/system-info
- name: Display NVIDIA GPU details

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: probably this should be factored out and re-used across GPU CI tasks

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ill create a follow up

{
echo "# GPU Compression"
echo
echo '```text'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

whats the ' after text for?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The single quotes are shell quoting, not part of the output — they stop the shell from treating the backticks in ```text as command substitution. The heredoc emits a plain ```text fence into comment.md.


Generated by Claude Code

cargo run -p compress-bench --profile release_debug
```

GPU decompression is opt-in and runs only the existing benchmark names allow-listed in

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this GPU only then?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

How do you mean?

datasets_filter: Option<Regex>,
formats: Vec<Format>,
ops: Vec<CompressOp>,
gpu_decompress: bool,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be a vec of [cpu, gpu]?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

do you think anything is gpu only?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i mean decompression at least

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe a flag is the right thing here

/// Run GPU decompression for the allow-listed benchmarks.
///
/// This filters the suite to GPU-supported dataset names and runs only Vortex decompression.
#[arg(long)]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe worth considering handling a list of processors. cpu is default but the user can override

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

can we do that if and when?

let open_options = SESSION.open_options().with_cuda();
#[cfg(target_os = "linux")]
let open_options =
open_options.with_read_at_options(PooledFileReadAtOptions::default().with_direct_io());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should direct io be a flag?

Two open review comments on the GPU compression benchmark:

- Put the `cargo build` flags for the benchmark on a single line rather than
  splitting them across a continuation.
- Make direct IO a flag instead of hardcoding it. `--gpu-decompress` still
  defaults to `O_DIRECT` so repeated iterations measure storage bandwidth
  rather than page-cache hits; `--no-gpu-direct-io` opts back into the page
  cache. Direct IO remains Linux-only, so the flag is inert elsewhere.

Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
`compress-bench --gpu-decompress` forces `ops` to `[Decompress]`, so no
compressed sizes are recorded and `CompressMeasurements::ratios` stays empty.
Rendering the ratios table then indexed `measurements[baseline_target]` for a
target with no entry and panicked:

    thread 'main' panicked at vortex-bench/src/display.rs:50:32:
    no entry found for key

The empty-target list the caller passes when the baseline format is absent hit
a second panic in the same function, a divide-by-zero when sizing the map.

Skip rendering when there are no measurements or no targets, and cover both
cases with regression tests.

Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
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.

3 participants