From 1a88bb4edeed14749b0f7de3de28cb8841b2075f Mon Sep 17 00:00:00 2001 From: Joe Isaacs Date: Wed, 19 Aug 2026 13:30:40 +0100 Subject: [PATCH 1/3] Benchmark OnPair Arrow GPU export Signed-off-by: Robert Kruszewski --- vortex-cuda/benches/onpair_cuda.rs | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/vortex-cuda/benches/onpair_cuda.rs b/vortex-cuda/benches/onpair_cuda.rs index 0aa716f0c0a..d02fdc37663 100644 --- a/vortex-cuda/benches/onpair_cuda.rs +++ b/vortex-cuda/benches/onpair_cuda.rs @@ -24,6 +24,9 @@ use vortex::dtype::Nullability; use vortex::error::VortexExpect; use vortex_cuda::CudaDispatchMode; use vortex_cuda::CudaSession; +use vortex_cuda::VarBinExportLayout; +use vortex_cuda::arrow::DeviceArrayExt; +use vortex_cuda::arrow::release_device_array; use vortex_cuda::executor::CudaArrayExt; use vortex_cuda_macros::cuda_available; use vortex_cuda_macros::cuda_not_available; @@ -37,6 +40,14 @@ use crate::timed_launch_strategy::TimedLaunchStrategy; // other kernels benchmark. const BENCH_SIZES: &[(usize, &str)] = &[(10_000_000, "10M")]; +fn session_with_varbin_layout(layout: VarBinExportLayout) -> vortex::session::VortexSession { + vortex::array::array_session().with_some( + CudaSession::try_default() + .vortex_expect("failed to create CUDA session") + .with_varbin_export_layout(layout), + ) +} + struct OnPairBenchFixture { array: ArrayRef, uncompressed_size: u64, @@ -92,6 +103,30 @@ fn benchmark_onpair_cuda_decompress(c: &mut Criterion) { }); }, ); + + group.bench_with_input( + BenchmarkId::new("cuda/onpair/decompress_to_varbin", len_str), + &fixture.array, + |b, onpair_array| { + b.iter_custom(|iters| { + let timed = TimedLaunchStrategy::default(); + let timer = timed.timer(); + let session = session_with_varbin_layout(VarBinExportLayout::VarBin); + let mut cuda_ctx = CudaSession::create_execution_ctx(&session) + .vortex_expect("failed to create execution context") + .with_dispatch_mode(CudaDispatchMode::StandaloneOnly) + .with_launch_strategy(Arc::new(timed)); + + for _ in 0..iters { + let mut exported = + block_on(onpair_array.clone().export_device_array(&mut cuda_ctx)) + .vortex_expect("export OnPair device array"); + release_device_array(&mut exported); + } + Duration::from_nanos(timer.load(Ordering::Relaxed)) + }); + }, + ); } group.finish(); From 47ffeff6c104b81296f7c623275a3a3a9ff1348e Mon Sep 17 00:00:00 2001 From: Joe Isaacs Date: Wed, 19 Aug 2026 13:30:52 +0100 Subject: [PATCH 2/3] Run OnPair CUDA benchmark in CodSpeed Signed-off-by: Robert Kruszewski --- .github/workflows/codspeed.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index b61df171865..a14fcf57919 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -55,7 +55,7 @@ jobs: - { shard: 4, name: "Encodings 1", packages: "vortex-alp vortex-bytebool vortex-datetime-parts" } - { shard: 5, name: "Encodings 2", packages: "vortex-decimal-byte-parts vortex-fastlanes vortex-fsst", features: "--features _test-harness" } - { shard: 6, name: "Encodings 3", packages: "vortex-pco vortex-runend vortex-sequence" } - - { shard: 7, name: "Encodings 4 & layout", packages: "vortex-sparse vortex-zigzag vortex-zstd vortex-layout" } + - { shard: 7, name: "Encodings 4", packages: "vortex-sparse vortex-zigzag vortex-zstd" } - { shard: 8, name: "Storage formats & row encoding", packages: "vortex-flatbuffers vortex-proto vortex-btrblocks vortex-row" } - { shard: 9, name: "Tensor & spatial", packages: "vortex-tensor vortex-spatial" } name: "Benchmark with Codspeed (Shard #${{ matrix.shard }})" @@ -232,6 +232,7 @@ jobs: --bench date_time_parts_cuda \ --bench dict_cuda \ --bench fsst_cuda \ + --bench onpair_cuda \ --bench runend_cuda \ --profile bench - name: Package CUB shared library @@ -255,7 +256,7 @@ jobs: include: - { shard: 1, name: "Bitpacked", benches: "bitpacked_cuda" } - { shard: 2, name: "Dynamic dispatch", benches: "dynamic_dispatch_cuda" } - - { shard: 3, name: "Standalone kernels", benches: "alp_cuda date_time_parts_cuda dict_cuda fsst_cuda runend_cuda" } + - { shard: 3, name: "Standalone kernels", benches: "alp_cuda date_time_parts_cuda dict_cuda fsst_cuda onpair_cuda runend_cuda" } name: "Benchmark with Codspeed (CUDA Shard #${{ matrix.shard }} - ${{ matrix.name }})" timeout-minutes: 30 runs-on: >- From 9b0fa11cf80988f1642b7ce68622514a93076957 Mon Sep 17 00:00:00 2001 From: Joe Isaacs Date: Wed, 19 Aug 2026 13:31:26 +0100 Subject: [PATCH 3/3] Preserve current CodSpeed shard layout Signed-off-by: Robert Kruszewski --- .github/workflows/codspeed.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index a14fcf57919..f9b5f3552b8 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -55,7 +55,7 @@ jobs: - { shard: 4, name: "Encodings 1", packages: "vortex-alp vortex-bytebool vortex-datetime-parts" } - { shard: 5, name: "Encodings 2", packages: "vortex-decimal-byte-parts vortex-fastlanes vortex-fsst", features: "--features _test-harness" } - { shard: 6, name: "Encodings 3", packages: "vortex-pco vortex-runend vortex-sequence" } - - { shard: 7, name: "Encodings 4", packages: "vortex-sparse vortex-zigzag vortex-zstd" } + - { shard: 7, name: "Encodings 4 & layout", packages: "vortex-sparse vortex-zigzag vortex-zstd vortex-layout" } - { shard: 8, name: "Storage formats & row encoding", packages: "vortex-flatbuffers vortex-proto vortex-btrblocks vortex-row" } - { shard: 9, name: "Tensor & spatial", packages: "vortex-tensor vortex-spatial" } name: "Benchmark with Codspeed (Shard #${{ matrix.shard }})"