Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HostTable interface to allow wielding of host tables in native code #2393

Open
wants to merge 1 commit into
base: branch-24.10
Choose a base branch
from

Conversation

jlowe
Copy link
Member

@jlowe jlowe commented Sep 10, 2024

Depends upon rapidsai/cudf#16784.

Adds a host version of cudf::table_view and cudf::column_view so we can examine and construct tables in host memory, along with APIs to construct a contiguous device table from a host table. This makes it easier to move some host processing code from Java into native code to avoid excessive object creation for very wide and/or deeply nested table schemas.

@jlowe jlowe self-assigned this Sep 10, 2024
@ttnghia ttnghia self-requested a review September 16, 2024 22:08
Comment on lines +28 to +38
* @brief A non-owning, immutable view of host data as a column of elements,
* some of which may be null as indicated by a bitmask.
*
* Unless otherwise noted, the memory layout of the `host_column_view`'s data and
* bitmask is expected to adhere to the Arrow Physical Memory Layout
* Specification: https://arrow.apache.org/docs/memory_layout.html
*
* Because `host_column_view` is non-owning, no host memory is allocated nor freed
* when `host_column_view` objects are created or destroyed.
*/
class host_column_view {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that this class has almost identical members as cudf::column_view. So, given a host data buffer as a column of elements, we should be able to construct an instance of cudf::column_view out of it. We just need to keep track that the created instance is viewing host data, and this can be done in Java through a boolean flag.

Did I miss anything here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants