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

[REVIEW] Add GDF_BOOL type #1142

Merged
merged 37 commits into from
Apr 29, 2019
Merged

Conversation

jrhemstad
Copy link
Contributor

@jrhemstad jrhemstad commented Mar 7, 2019

Supersedes #817

  • Adds a new GDF_BOOL8 gdf_dtype and gdf_bool8 storage type.
  • Adds corresponding cudf::bool8 wrapper (cannot redefine bool in a namespace, 8 indicates an 8-bit representation)
  • Updates type_dispatcher
  • Updates gdf_dtype_of
  • Updates wrapper tests
  • Adds specializations for wrapper operators for bool8
  • Adds specialization for convertStrToValue https://github.com/rapidsai/cudf/blob/branch-0.6/cpp/src/io/csv/type_conversion.cuh#L256
  • Adds specializations for std::numeric_limits for cudf::bool8
  • Removes problematic pre/post increment/decrement operators for wrappers (operator++/operator--).
  • Fixes reductions and scan SFINAE to support GDF_BOOL8
  • Adds GDF_BOOL8 type to testing of reduction, scan, gather and scatter
  • Cython mappings to new type

This PR does NOT address testing / supporting of GDF_BOOL8 in the following modules. Testing of these should be added in another PR: atomics, binary and unary operations, order_by, group_by, join, hashing, replace, quantiles, CSV, Parquet, and any other file loaders. Issue #1518 filed to cover this.

I (@harrism) tried to add cudf::bool8 as a tested type to orderby, but ran into failures because the reference solution assumes integer arithmetic/comparison semantics rather than Boolean semantics. Therefore I decided that testing support for BOOL8 everywhere is too large a task for this PR.

Closes #667

@jrhemstad jrhemstad self-assigned this Mar 7, 2019
@jrhemstad jrhemstad added 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. labels Mar 7, 2019
@jrhemstad jrhemstad changed the title Add GDF_BOOL type [WIP] Add GDF_BOOL type Mar 7, 2019
…ithmetic wrapper operator tests to cast to original type.
@jrhemstad jrhemstad changed the base branch from branch-0.6 to branch-0.7 March 8, 2019 22:17
@harrism harrism assigned harrism and unassigned jrhemstad Apr 18, 2019
@harrism harrism added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Apr 18, 2019
@harrism
Copy link
Member

harrism commented Apr 18, 2019

@jrhemstad This is ready for review, but I can't request that you review it since you originally started the PR!

@harrism harrism requested a review from kovaltan April 18, 2019 07:33
@harrism
Copy link
Member

harrism commented Apr 18, 2019

I realized I didn't overload any comparison operators except ==, which can't be right... so that means the tests are also insufficient. Still a bit to do here.

Copy link
Contributor

@kovaltan kovaltan left a comment

Choose a reason for hiding this comment

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

Some questions about cudf::bool8 operators, I'm not sure we need them or not.
Others looks good to me.

cpp/src/utilities/wrapper_types.hpp Outdated Show resolved Hide resolved
cpp/src/utilities/wrapper_types.hpp Show resolved Hide resolved
cpp/src/utilities/device_atomics.cuh Show resolved Hide resolved
cpp/src/reductions/reductions.cu Outdated Show resolved Hide resolved
@jrhemstad
Copy link
Contributor Author

@harrism since it's my own PR, I can't "Approve" formally, so I'll say that all the changes look good.

@harrism harrism dismissed kovaltan’s stale review April 29, 2019 21:11

@kovaltan is on vacation and his suggestion is resolved.

Copy link
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

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

Approving even though latest changes are mine, since Jake verbally approved and he can't officially approve since it's his PR.

@harrism harrism merged commit f14dc52 into rapidsai:branch-0.7 Apr 29, 2019
@eyalroz
Copy link
Collaborator

eyalroz commented Apr 29, 2019

@jrhemstad : 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team libcudf Affects libcudf (C++/CUDA) code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Boolean data type
5 participants