Skip to content

Commit 3a8ddb6

Browse files
committed
cleanup
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
1 parent 623a8e5 commit 3a8ddb6

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

vortex-cuda/cudf-test/src/lib.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44
//! This file is a simple C-compatible API that is called from the cudf-test-harness at CI time.
55
6-
use std::sync::LazyLock;
7-
6+
use arrow_schema::DataType;
7+
use arrow_schema::ffi::FFI_ArrowSchema;
88
use futures::executor::block_on;
9+
use std::sync::LazyLock;
910
use vortex::array::IntoArray;
1011
use vortex::array::arrays::PrimitiveArray;
1112
use vortex::array::session::ArraySession;
12-
use vortex::error::VortexResult;
1313
use vortex::expr::session::ExprSession;
1414
use vortex::io::session::RuntimeSession;
1515
use vortex::layout::session::LayoutSession;
@@ -31,11 +31,16 @@ static SESSION: LazyLock<VortexSession> = LazyLock::new(|| {
3131

3232
/// External array
3333
#[unsafe(no_mangle)]
34-
pub extern "C" fn export_array(array_ptr: &mut ArrowDeviceArray) -> i32 {
34+
pub extern "C" fn export_array(
35+
schema_ptr: &mut FFI_ArrowSchema,
36+
array_ptr: &mut ArrowDeviceArray,
37+
) -> i32 {
3538
let mut ctx = CudaSession::create_execution_ctx(&SESSION).unwrap();
3639

3740
let primitive = PrimitiveArray::from_iter(0u32..1024);
3841

42+
*schema_ptr = FFI_ArrowSchema::try_from(DataType::UInt32).unwrap();
43+
3944
match block_on(primitive.into_array().export_device_array(&mut ctx)) {
4045
Ok(exported) => {
4146
*array_ptr = exported;

vortex-cuda/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ mod session;
1515
mod stream;
1616
mod stream_pool;
1717

18-
pub(crate) use arrow::CanonicalDeviceArrayExport;
1918
pub use arrow::ExportDeviceArray;
2019
pub use canonical::CanonicalCudaExt;
2120
pub use device_buffer::CudaBufferExt;

vortex-cuda/src/session.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use std::fmt::Debug;
55
use std::sync::Arc;
66

77
use cudarc::driver::CudaContext;
8-
use vortex_array::ArrayRef;
98
use vortex_array::VortexSessionExecute;
109
use vortex_array::vtable::ArrayId;
1110
use vortex_error::VortexResult;
@@ -14,7 +13,6 @@ use vortex_session::SessionExt;
1413
use vortex_utils::aliases::dash_map::DashMap;
1514

1615
use crate::ExportDeviceArray;
17-
use crate::arrow::ArrowDeviceArray;
1816
use crate::arrow::CanonicalDeviceArrayExport;
1917
use crate::executor::CudaExecute;
2018
pub use crate::executor::CudaExecutionCtx;

0 commit comments

Comments
 (0)