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

cudf::column redesign #2207

Merged
merged 282 commits into from
Oct 2, 2019
Merged

Conversation

jrhemstad
Copy link
Contributor

@jrhemstad jrhemstad commented Jul 9, 2019

Closes: #1443

Depends on rapidsai/rmm#99

In effort to provide a replacement for gdf_column and related infrastructure, this PR introduces a cudf::column and associated classes.

Goals:

  • Memory allocation is handled via constructors
  • Memory ownership is well-defined
  • Control shallow vs. deep copy w/ C++ move semantics
  • Access to data and bitmask is controlled via member functions
  • All memory allocated by libcudf is owned by a C++ object

Non Goals:

  • Implement types other than primitive, fixed width types (e.g., strings, categories, etc.)
    • But we will provide a path forward for these types

What's new?

  • cudf::column
    • Memory owning class
    • Allocates memory on construction, deallocates on destruction
    • Enables compound column types via a vector of "child" columns
  • cudf::column_view
    • Non-owning, immutable class allows viewing data as a column
    • Similar to a llvm::ArrayRef can be constructed from a cudf::column or a void* to device memory
    • All column inputs to libcudf will be as column_views
  • cudf::column_view
    • Non-owning, mutable class allows viewing data as a column
    • Similar to a llvm::MutableArrayRef, can be constructed from a cudf::column or a void* to device memory
    • All column in/out arguments to libcudf will be as mutable_column_views
  • cudf::column_device_view
    • Same as above, but with __device__ accessors
  • cudf::mutable_column_view
    • A mutable column_view, for in/out parameters to libcudf functions
  • cudf::exp::table
    • Owning set of cudf::columns of the same size
    • exp namespace to disambiguate from existing cudf::table
  • cudf::table_view
    • Set of column_views of the same size
  • cudf::mutable_table_view
    • Set of mutable_column_views of the same size

@jrhemstad jrhemstad added libcudf Affects libcudf (C++/CUDA) code. 2 - In Progress Currently a work in progress labels Jul 9, 2019
@raydouglass
Copy link
Member

rerun tests

@kkraus14
Copy link
Collaborator

kkraus14 commented Oct 2, 2019

Test failure is innocuous, we have a 10 decimal point equality check for a rounding function in number and it was equal to 9 points, first time seeing that failure. Will admin merge this once the last gpu tester comes back and follow up on that test in an issue / PR to reduce the precision.

@kkraus14 kkraus14 merged commit a902d7c into rapidsai:branch-0.10 Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge libcudf Affects libcudf (C++/CUDA) code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DISCUSSION] libcudf column abstraction redesign