Skip to content

Conversation

@a10y
Copy link
Contributor

@a10y a10y commented Feb 2, 2026

This PR adds scaffolding for the first part of implementing export of Vortex Arrays directly to Arrow C Data Device Interface arrays, and implements the actual export for PrimitiveArray

Setup

Arrow defines a standard for exchanging data in-process to native code using the C Data Interface, which converts an Arrow array into a struct of pointers.

There is an (experimental, but mostly stable) extension called the C Data Device Interface which includes extra information such as the GPU device type and device ID.

cudf knows how to import data exported this way using the from_arrow_device_column method for column_views.

We replicate the ArrowArray and ArrowDeviceArray structs from the spec.

These are very similar to the existing FFI_ArrowArray and FFI_ArrowSchema structs from the arrow-data crate, except that those use arrow Bytes and real pointers and we need to use CUDA device pointers and BufferHandles.

Testing

Rather than polluting the repo/CI with fetching and building cudf, I made a new repo https://github.com/vortex-data/cudf-test-harness/

This will load a cdylib, call its export_array() function, imports it into cudf and calls some simple functions, then frees it by calling the embedded release function pointer. This step is hooked up to CI now and only adds ~1m to the CUDA tests jobs.

@a10y a10y force-pushed the aduffy/c-device-iface branch from 9d62079 to 18f8a3d Compare February 2, 2026 20:05
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 3, 2026

Merging this PR will not alter performance

✅ 1138 untouched benchmarks
⏩ 1265 skipped benchmarks1


Comparing aduffy/c-device-iface (75cb1ee) with develop (e0a6043)

Open in CodSpeed

Footnotes

  1. 1265 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@a10y a10y force-pushed the aduffy/c-device-iface branch from 3a8ddb6 to a2d1c95 Compare February 3, 2026 17:19
@a10y a10y added the changelog/feature A new feature label Feb 3, 2026
@a10y a10y changed the title WIP: initial work toward export to device interface feat[cuda]: export arrays to ArrowDeviceArray Feb 3, 2026
@a10y a10y force-pushed the aduffy/c-device-iface branch 2 times, most recently from 497d765 to 79b7afc Compare February 3, 2026 17:59
@a10y a10y marked this pull request as ready for review February 3, 2026 18:19
a10y added 10 commits February 3, 2026 13:28
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
@a10y a10y force-pushed the aduffy/c-device-iface branch from 74549dc to 930f824 Compare February 3, 2026 18:28
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
@a10y a10y force-pushed the aduffy/c-device-iface branch from 930f824 to b489712 Compare February 3, 2026 18:29
a10y added 2 commits February 3, 2026 13:30
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
@a10y a10y requested review from 0ax1 and joseph-isaacs February 3, 2026 18:49
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants