Repository navigation
perf(cuda-ffi): late string expansion for GPU reads - #11422
Conversation
|
@claude review |
|
Claude finished @0ax1's task in 3m 4s —— View job Review: late string expansion helper (
|
…11421) ## Summary First of two stacked drafts: expose dictionary-preserving GPU batches so consumers can postpone string expansion until after combining batches. This PR adds the export API only; the companion PR #11422 adds an optional cuDF materialization helper and reports the ~20% end-to-end hot-read gain. A fixed-schema Arrow device stream cannot describe batches whose dictionary encodings or index widths differ. The new iterator returns an independently owned schema and device array for each batch, using the existing `DictionaryExport::Preserve` policy. ## Changes - Add `vx_cuda_scan_path_device_batches`, `vx_cuda_device_batches_next`, and `vx_cuda_device_batches_free`. - Reuse the existing scan options, ordered top-level projection, direct I/O, and batch splitting. - Keep the existing fixed-schema Arrow stream API and its decoded output unchanged. - Document ownership, stream synchronization, thread affinity, end-of-stream, and terminal-error behavior; regenerate the C header. - Add 10 regression tests for varying dictionary/index types, plain batches, nulls, empty batches, projection, independent output lifetimes, invalid inputs, and terminal errors. --------- Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
5084784 to
2abc5a7
Compare
71ed9e4 to
976b4c9
Compare
## What changed Remove the duplicate image definitions from `.github/runs-on.yml` so Vortex uses the shared configuration. The local definitions were hiding the shared GPU images. That caused [the cuDF tests in #11422](https://github.com/vortex-data/vortex/actions/runs/43908865241/job/133445095829) to boot a stock image without Pixi, even though the custom image was ready. Linux and Windows image selections stay the same. ## Testing - Checked that the removed definitions match the shared ones; YAML and whitespace checks passed. - The custom x64 image already [passed all 29 cuDF integration tests](https://github.com/vortex-data/vortex/actions/runs/43891010084/job/133381881332) with an explicit AMI override. After merge, rerun #11422’s cuDF job without the override to confirm it picks the custom image. RunsOn reads this configuration from `develop`, so we can only verify that part after merging. Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Add an optional cuDF adapter with stream-ordered concatenation and a runtime-detected fixed-width payload fast path. Keep dictionary key order independent across batches and cover nullable, sliced, mixed-width, and empty inputs. Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
The ubuntu24-gpu-x64 image behind runner=gpu now resolves to the cuDF GPU AMI (vortex-data/.github-private#54), which bakes the vortex-cuda Pixi environment into /opt/cudf. Drop the ami= override and the dispatch input that existed only to try that image before the switch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
"CUDA tests (cudf)" already runs the cudf-test-harness integration tests, so calling this job a cuDF integration test was ambiguous. It builds and runs the GTest suite for vortex_cudf_dictionary.hpp, so name the job, runner tag, step and build directory after that header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
2bc1008 to
4516ed7
Compare
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
## What changed Point the GPU compression benchmark at `ubuntu24-gpu-x64-pre`, the distinct custom image alias introduced in vortex-data/.github-private#55, instead of RunsOn’s stock image name. Also replace the unverified inheritance explanation in `.github/runs-on.yml` with a simple note about where the shared definitions live. This does not change configuration behavior. ## Validation YAML parsing, a cross-check against the proposed shared image alias, and `git diff --check` passed. The benchmark’s other settings are unchanged. Merge after vortex-data/.github-private#55 lands and #11422’s cuDF integration job confirms that the shared GPU runner selects the custom AMI. No AMI rebuild is needed. Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
Summary
Enables ~20% higher hot GPU read throughput in the companion BenchPress integration. Builds on #11421 (merged).
Adds an optional cuDF helper that combines dictionary batches before expanding strings, with a fast path for fixed-width string payloads. Supports differing dictionary orders, nulls, and integer code widths; adds standalone C++ tests. No dataset-specific assumptions, file-format changes, or cuDF dependency in the Rust FFI.
Performance
Baseline expands strings per batch before concatenation. Optimized uses late expansion plus companion BenchPress changes: one final synchronization and direct numeric/date copies. Those companion changes are not in this PR.
GB/s measures uncompressed logical output, not disk bandwidth. Both Vortex modes read the same files and produce fully materialized GPU tables inside the timer.
Measurement
null_blkcapped at ~7 GB/s—not a real NVMe model.5bfa7ceec8+ BenchPressb4d5bcd, before restacking; benchmarks have not been rerun after the rebase or review changes.