feat: add a ci gpu compress benchmark - #8951
Conversation
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
GPU Compression |
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
Merging this PR will improve performance by 17.18%
|
| 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)
Footnotes
-
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. ↩
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
a781d14 to
8cdd1b1
Compare
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>
0ax1
left a comment
There was a problem hiding this comment.
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 \ |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
nit: probably this should be factored out and re-used across GPU CI tasks
There was a problem hiding this comment.
Ill create a follow up
| { | ||
| echo "# GPU Compression" | ||
| echo | ||
| echo '```text' |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
How do you mean?
| datasets_filter: Option<Regex>, | ||
| formats: Vec<Format>, | ||
| ops: Vec<CompressOp>, | ||
| gpu_decompress: bool, |
There was a problem hiding this comment.
Should this be a vec of [cpu, gpu]?
There was a problem hiding this comment.
do you think anything is gpu only?
There was a problem hiding this comment.
i mean decompression at least
There was a problem hiding this comment.
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)] |
There was a problem hiding this comment.
maybe worth considering handling a list of processors. cpu is default but the user can override
There was a problem hiding this comment.
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()); |
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>
Adds a bench-compression GPU variant.
Currently this fails to run. But we can fix that outside of adding the bench.