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 cudf::shift to handle offset greater than column size #10414

Merged
merged 7 commits into from
Mar 17, 2022

Conversation

davidwendt
Copy link
Contributor

@davidwendt davidwendt commented Mar 11, 2022

Closes #10314

Fixes logic to handle abs(offset) > input.size() when passed to cudf::shift. As mentioned in #10314 this was causing an unexpected exception:

C++ exception with description "parallel_for failed: cudaErrorInvalidConfiguration: invalid configuration argument" thrown in the test body.

The behavior now fills the entire output column with the input scalar value. If the scalar is null, then the column is filled with null entries. The logic added here did not require changing or adding any new kernel functions. Additional gtests were added to shift_tests.cpp as well.

@davidwendt davidwendt added bug Something isn't working 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change labels Mar 11, 2022
@davidwendt davidwendt self-assigned this Mar 11, 2022
@codecov
Copy link

codecov bot commented Mar 11, 2022

Codecov Report

Merging #10414 (6f85bd0) into branch-22.04 (0be0b00) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff                @@
##           branch-22.04   #10414      +/-   ##
================================================
+ Coverage         86.13%   86.15%   +0.01%     
================================================
  Files               139      139              
  Lines             22438    22434       -4     
================================================
+ Hits              19328    19329       +1     
+ Misses             3110     3105       -5     
Impacted Files Coverage Δ
python/cudf/cudf/core/column/column.py 89.22% <ø> (+0.05%) ⬆️
python/cudf/cudf/core/column/string.py 88.39% <0.00%> (+0.12%) ⬆️
python/cudf/cudf/core/groupby/groupby.py 91.57% <0.00%> (+0.22%) ⬆️
python/cudf/cudf/core/tools/datetimes.py 84.49% <0.00%> (+0.30%) ⬆️
python/cudf/cudf/core/column/lists.py 90.56% <0.00%> (+0.47%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a066e7f...6f85bd0. Read the comment docs.

@github-actions github-actions bot added the Python Affects Python cuDF API. label Mar 14, 2022
@davidwendt davidwendt added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Mar 14, 2022
@davidwendt davidwendt marked this pull request as ready for review March 14, 2022 16:37
@davidwendt davidwendt requested review from a team as code owners March 14, 2022 16:37
Copy link
Contributor

@mythrocks mythrocks left a comment

Choose a reason for hiding this comment

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

LGTM!

@davidwendt
Copy link
Contributor Author

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 9a60671 into rapidsai:branch-22.04 Mar 17, 2022
@davidwendt davidwendt deleted the bug-shift-past-end branch March 17, 2022 23:50
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 Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] copying::shift doesn't handle abs(offset) > column.size()
4 participants