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

Fix valid count computation in offset_bitmask_binop kernel #13489

Merged

Conversation

davidwendt
Copy link
Contributor

Description

Fixes the valid count calculation in the offset_bitmask_binop kernel when the mask may contain slack bits. The slack bits must be accounted for in the final bitmask word to correctly compute the valid count.

Closes #13479

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@davidwendt davidwendt added bug Something isn't working 3 - Ready for Review Ready for review by team libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change labels Jun 1, 2023
@davidwendt davidwendt requested a review from a team as a code owner June 1, 2023 17:06
@davidwendt davidwendt self-assigned this Jun 1, 2023
@davidwendt davidwendt requested review from bdice, mythrocks and vyasr and removed request for a team June 1, 2023 17:06
Copy link
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

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

Thanks for finding this @davidwendt! Also great work getting repros @wence- @shwina.

Approving with one minor suggestion for improvement.

cpp/include/cudf/detail/null_mask.cuh Outdated Show resolved Hide resolved
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

Approving in current form. I have one comment suggesting a refactor but I am fine with merging as-is or applying the refactor.

Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

New changes look great. One commented line can be deleted. Otherwise let's get this fix merged! Very nice work @davidwendt. 💯

@wence-
Copy link
Contributor

wence- commented Jun 2, 2023

Just to note this latest version is still good on our reproducers for me.

@raydouglass raydouglass merged commit 6bb0328 into rapidsai:branch-23.06 Jun 2, 2023
@davidwendt davidwendt deleted the bug-bitmask-binop-null-count branch June 2, 2023 13:25
rapids-bot bot pushed a commit that referenced this pull request Jun 9, 2023
Fixes some logic in the `groupby/sort/sort_helper.cu` to improve memoization safety. Some functions cache their results so they may be called several times. This change ensures the cached variable is fully formed before returning it so that parallel calls do not get a partially built result. The code also simplifies some of the logic by replacing some thrust calls with equivalent `cudf::detail` function calls that return columns.

Found while working on #13489

Authors:
  - David Wendt (https://github.com/davidwendt)

Approvers:
  - Yunsong Wang (https://github.com/PointKernel)
  - Nghia Truong (https://github.com/ttnghia)

URL: #13521
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 bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants