Skip to content

Commit 3974ee0

Browse files
authored
perf(cuda): migrate consumers to vortex-cuda-driver (#10722)
## Problem Vortex's CUDA consumers still use cudarc and cannot use the new driver's access tracking. ## Solution Migrate consumers to `vortex-cuda-driver`, move `i256` support into its optional feature, and remove cudarc. ## Assessment Changes public CUDA types and removes `vortex-array`'s `cudarc` feature. The driver stays unpublished. Builds on the merged CUDA PRs. Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
1 parent a74fdc7 commit 3974ee0

55 files changed

Lines changed: 213 additions & 271 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Cargo.lock‎

Lines changed: 8 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,6 @@ clap = "4.5"
132132
criterion = { package = "codspeed-criterion-compat-walltime", version = "5.0.0" }
133133
crossbeam-channel = "0.5.16"
134134
crossterm = "0.29"
135-
cudarc = { version = "0.19.0", features = [
136-
# The NSight Compute version available on lambda.ai hosts does not inject a symbol for
137-
# several functions that cudarc expects to load when this is set to "cuda-12080". We
138-
# don't use any CUDA 12.8 specific features currently so this is fine.
139-
"cuda-12050",
140-
] }
141135
custom-labels = "0.4.4"
142136
dashmap = "6.2.1"
143137
datafusion = { version = "55.0.0", default-features = false, features = [

‎vortex-array/Cargo.toml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ arcref = { workspace = true }
2828
arrow-buffer = { workspace = true }
2929
bytes = { workspace = true }
3030
cfg-if = { workspace = true }
31-
cudarc = { workspace = true, optional = true }
3231
enum-iterator = { workspace = true }
3332
fearless_simd = { workspace = true }
3433
fearless_simd_macros = { workspace = true }
@@ -76,7 +75,6 @@ vortex-utils = { workspace = true, features = ["dyn-traits"] }
7675
[features]
7776
arbitrary = ["dep:arbitrary", "dep:primitive-types"]
7877
canonical_counter = []
79-
cudarc = ["dep:cudarc"]
8078
table-display = ["dep:tabled"]
8179
_test-harness = ["dep:goldenfile", "dep:rstest", "dep:rstest_reuse"]
8280
serde = ["dep:serde", "vortex-buffer/serde", "vortex-mask/serde"]

‎vortex-array/src/dtype/bigint/mod.rs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ use vortex_error::VortexExpect;
3939
#[derive(Debug, Copy, Clone, Default, Eq, PartialEq, Hash, PartialOrd, Ord)]
4040
pub struct i256(arrow_buffer::i256);
4141

42-
#[cfg(feature = "cudarc")]
43-
unsafe impl cudarc::driver::DeviceRepr for i256 {}
44-
4542
#[expect(
4643
clippy::same_name_method,
4744
reason = "inherent methods intentionally shadow arrow_buffer::i256 methods"

‎vortex-cuda/Cargo.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ _test-harness = []
2323
[dependencies]
2424
arrow-schema = { workspace = true, features = ["ffi"] }
2525
async-trait = { workspace = true }
26-
cudarc = { workspace = true, features = ["f16"] }
2726
futures = { workspace = true, features = ["executor"] }
2827
itertools = { workspace = true }
2928
kanal = { workspace = true }
@@ -36,9 +35,10 @@ prost = { workspace = true }
3635
tokio = { workspace = true, features = ["fs"] }
3736
tracing = { workspace = true, features = ["std", "attributes"] }
3837
vortex = { workspace = true, features = ["zstd"] }
39-
vortex-array = { workspace = true, features = ["cudarc"] }
38+
vortex-array = { workspace = true }
4039
vortex-arrow = { workspace = true }
4140
vortex-cub = { path = "cub" }
41+
vortex-cuda-driver = { workspace = true, features = ["f16", "i256"] }
4242
vortex-cuda-macros = { workspace = true }
4343
vortex-error = { workspace = true, features = ["object_store"] }
4444
vortex-nvcomp = { path = "nvcomp" }

‎vortex-cuda/benches/alp_cuda.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use std::time::Duration;
1919
use criterion::BenchmarkId;
2020
use criterion::Criterion;
2121
use criterion::Throughput;
22-
use cudarc::driver::DeviceRepr;
2322
use futures::executor::block_on;
2423
use mimalloc::MiMalloc;
2524
use vortex::array::IntoArray;
@@ -43,6 +42,7 @@ use vortex_array::session::ArraySession;
4342
use vortex_cuda::CudaDispatchMode;
4443
use vortex_cuda::CudaSession;
4544
use vortex_cuda::executor::CudaArrayExt;
45+
use vortex_cuda_driver::DeviceRepr;
4646
use vortex_cuda_macros::cuda_available;
4747
use vortex_cuda_macros::cuda_not_available;
4848

‎vortex-cuda/benches/bitpacked_cuda.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use std::time::Duration;
1919
use criterion::BenchmarkId;
2020
use criterion::Criterion;
2121
use criterion::Throughput;
22-
use cudarc::driver::DeviceRepr;
2322
use futures::executor::block_on;
2423
use mimalloc::MiMalloc;
2524
use vortex::array::IntoArray;
@@ -42,6 +41,7 @@ use vortex_array::session::ArraySession;
4241
use vortex_cuda::CudaDispatchMode;
4342
use vortex_cuda::CudaSession;
4443
use vortex_cuda::executor::CudaArrayExt;
44+
use vortex_cuda_driver::DeviceRepr;
4545
use vortex_cuda_macros::cuda_available;
4646
use vortex_cuda_macros::cuda_not_available;
4747

‎vortex-cuda/benches/core_primitives.rs‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ use criterion::BatchSize;
1515
use criterion::BenchmarkId;
1616
use criterion::Criterion;
1717
use criterion::Throughput;
18-
use cudarc::driver::CudaContext;
19-
use cudarc::driver::CudaStream;
20-
use cudarc::driver::HostSlice;
21-
use cudarc::driver::SyncOnDrop;
22-
use cudarc::driver::result;
23-
use cudarc::driver::sys;
24-
use cudarc::driver::sys::CU_MEMHOSTALLOC_WRITECOMBINED;
25-
use cudarc::driver::sys::CUmemPool_attribute_enum;
2618
use mimalloc::MiMalloc;
19+
use vortex_cuda_driver::CudaContext;
20+
use vortex_cuda_driver::CudaStream;
21+
use vortex_cuda_driver::HostSlice;
22+
use vortex_cuda_driver::SyncOnDrop;
23+
use vortex_cuda_driver::result;
24+
use vortex_cuda_driver::sys;
25+
use vortex_cuda_driver::sys::CU_MEMHOSTALLOC_WRITECOMBINED;
26+
use vortex_cuda_driver::sys::CUmemPool_attribute_enum;
2727
use vortex_cuda_macros::cuda_available;
2828
use vortex_cuda_macros::cuda_not_available;
2929

@@ -92,7 +92,7 @@ impl HostSlice<u8> for CudaHostBuffer {
9292
) -> (&'a [u8], SyncOnDrop<'a>) {
9393
(
9494
unsafe { std::slice::from_raw_parts(self.ptr, self.len) },
95-
SyncOnDrop::Sync(None),
95+
SyncOnDrop::none(),
9696
)
9797
}
9898

@@ -102,7 +102,7 @@ impl HostSlice<u8> for CudaHostBuffer {
102102
) -> (&'a mut [u8], SyncOnDrop<'a>) {
103103
(
104104
unsafe { std::slice::from_raw_parts_mut(self.ptr, self.len) },
105-
SyncOnDrop::Sync(None),
105+
SyncOnDrop::none(),
106106
)
107107
}
108108
}

‎vortex-cuda/benches/delta_cuda.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use std::time::Duration;
2121
use criterion::BenchmarkId;
2222
use criterion::Criterion;
2323
use criterion::Throughput;
24-
use cudarc::driver::DeviceRepr;
2524
use futures::executor::block_on;
2625
use mimalloc::MiMalloc;
2726
use vortex::array::IntoArray;
@@ -43,6 +42,7 @@ use vortex_array::session::ArraySession;
4342
use vortex_cuda::CudaDispatchMode;
4443
use vortex_cuda::CudaSession;
4544
use vortex_cuda::executor::CudaArrayExt;
45+
use vortex_cuda_driver::DeviceRepr;
4646
use vortex_cuda_macros::cuda_available;
4747
use vortex_cuda_macros::cuda_not_available;
4848

‎vortex-cuda/benches/dict_cuda.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use std::time::Duration;
1818
use criterion::BenchmarkId;
1919
use criterion::Criterion;
2020
use criterion::Throughput;
21-
use cudarc::driver::DeviceRepr;
2221
use futures::executor::block_on;
2322
use mimalloc::MiMalloc;
2423
use vortex::array::IntoArray;
@@ -31,6 +30,7 @@ use vortex::error::VortexExpect;
3130
use vortex_cuda::CudaDispatchMode;
3231
use vortex_cuda::CudaSession;
3332
use vortex_cuda::executor::CudaArrayExt;
33+
use vortex_cuda_driver::DeviceRepr;
3434
use vortex_cuda_macros::cuda_available;
3535
use vortex_cuda_macros::cuda_not_available;
3636

0 commit comments

Comments
 (0)