Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ jobs:
run: |
git ls-files vortex-cuda vortex-cxx vortex-duckdb vortex-ffi \
| grep -E '\.(cpp|hpp|cu|cuh|h)$' \
| grep -v 'arrow/reference/arrow_c_device\.h$' \
| grep -v 'kernels/src/bit_unpack_.*\.cu$' \
| grep -v 'kernels/src/bit_unpack_.*_lanes\.cuh$' \
| xargs clang-format --dry-run --Werror --style=file
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@ path = ["vortex-cuda/kernels/src/bit_unpack_*"]
precedence = "override"
SPDX-FileCopyrightText = "Copyright the Vortex contributors"
SPDX-License-Identifier = "Apache-2.0"

[[annotations]]
path = "vortex-cuda/src/arrow/reference/arrow_c_device.h"
SPDX-FileCopyrightText = "2016-2025 Copyright The Apache Software Foundation"
SPDX-License-Identifier = "Apache-2.0"
1 change: 1 addition & 0 deletions vortex-cuda/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ unstable_encodings = ["vortex/unstable_encodings"]

[dependencies]
arc-swap = { workspace = true }
arrow-schema = { workspace = true, features = ["ffi"] }
async-trait = { workspace = true }
bytes = { workspace = true }
cudarc = { workspace = true, features = ["f16"] }
Expand Down
23 changes: 23 additions & 0 deletions vortex-cuda/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ fn main() {
generate_unpack::<u64>(&kernels_src, 16).expect("Failed to generate unpack for u64");

let out_dir = PathBuf::from(env::var("OUT_DIR").expect("OUT_DIR not set"));
generate_arrow_device_array_bindings(Path::new(&manifest_dir), &out_dir);
generate_dynamic_dispatch_bindings(&kernels_src, &out_dir);
generate_patches_bindings(&kernels_src, &out_dir);

Expand Down Expand Up @@ -196,6 +197,28 @@ fn nvcc_compile_ptx(
Ok(())
}

/// Generate bindings for the vendored Arrow C Device ABI header.
fn generate_arrow_device_array_bindings(manifest_dir: &Path, out_dir: &Path) {
let header = manifest_dir.join("src/arrow/reference/arrow_c_device.h");
println!("cargo:rerun-if-changed={}", header.display());

let bindings = bindgen::Builder::default()
.header(header.to_string_lossy())
.allowlist_type("ArrowArray")
.allowlist_type("ArrowDeviceArray")
.allowlist_type("ArrowDeviceType")
.allowlist_var("ARROW_DEVICE_.*")
.derive_copy(true)
.derive_debug(true)
.layout_tests(false)
.generate()
.expect("Failed to generate Arrow C Device bindings");

bindings
.write_to_file(out_dir.join("arrow_c_abi.rs"))
.expect("Failed to write arrow_c_abi.rs");
}

/// Generate bindings for the dynamic dispatch shared header.
fn generate_dynamic_dispatch_bindings(kernels_src: &Path, out_dir: &Path) {
let header = kernels_src.join("dynamic_dispatch.h");
Expand Down
30 changes: 0 additions & 30 deletions vortex-cuda/kernels/src/varbinview_compute_offsets.cu

This file was deleted.

39 changes: 0 additions & 39 deletions vortex-cuda/kernels/src/varbinview_copy_strings.cu

This file was deleted.

Loading
Loading