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

Another fix for offsets_end() iterator in lists_column_view #7575

Merged
merged 1 commit into from
Mar 12, 2021

Conversation

ttnghia
Copy link
Contributor

@ttnghia ttnghia commented Mar 11, 2021

This is another fix for offsets_end() iterator in lists_column_view. The last fix (#7551) was still not correct---that iterator should not be computed using the size of the offsets() child column, which is also the offsets of the original (non-sliced) column. Instead, it should be computed using the size() of the current column.

Interestingly, my previous fix passed all the unit tests, since thrust does not throw anything (like access violation) when the input range is larger than the output range.

…st fix was still not correct---that iterator should not be computed using the size of the offsets() child column, which is also the offsets of the original (non-sliced) column
@ttnghia ttnghia requested a review from a team as a code owner March 11, 2021 20:42
@ttnghia ttnghia requested review from trxcllnt and jrhemstad March 11, 2021 20:42
@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Mar 11, 2021
@ttnghia ttnghia added non-breaking Non-breaking change bug Something isn't working labels Mar 11, 2021
@ttnghia ttnghia changed the title Another fix for offset_end() iterator in lists_column_view Another fix for offsets_end() iterator in lists_column_view Mar 11, 2021
Copy link
Contributor

@jrhemstad jrhemstad left a comment

Choose a reason for hiding this comment

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

Ah, my bad for suggesting you change it originally. That's a subtle issue I didn't consider!

@davidwendt
Copy link
Contributor

You may want to run cuda-memcheck on some of the current lists unit gtests.

@ttnghia
Copy link
Contributor Author

ttnghia commented Mar 11, 2021

You may want to run cuda-memcheck on some of the current lists unit gtests.

Hah, this is great. I just ran cuda-memcheck on a test using this offsets_end(). Before applying this fix, my tests all passed, but cuda-memcheck reported 16 memory errors. After applying this fix then no more error.

Probably it is a good practice to always call cuda-memcheck on any new test and benchmark to catch any hidden error.

@ttnghia
Copy link
Contributor Author

ttnghia commented Mar 11, 2021

@gpucibot merge

@codecov
Copy link

codecov bot commented Mar 11, 2021

Codecov Report

Merging #7575 (0f0a40f) into branch-0.19 (7871e7a) will increase coverage by 0.53%.
The diff coverage is 92.85%.

Impacted file tree graph

@@               Coverage Diff               @@
##           branch-0.19    #7575      +/-   ##
===============================================
+ Coverage        81.86%   82.40%   +0.53%     
===============================================
  Files              101      101              
  Lines            16884    17342     +458     
===============================================
+ Hits             13822    14290     +468     
+ Misses            3062     3052      -10     
Impacted Files Coverage Δ
python/cudf/cudf/core/index.py 93.34% <ø> (+0.48%) ⬆️
python/cudf/cudf/core/column/column.py 87.80% <75.00%> (+0.04%) ⬆️
python/cudf/cudf/core/column/numerical.py 94.85% <85.71%> (-0.17%) ⬇️
python/cudf/cudf/core/frame.py 89.12% <89.47%> (+0.10%) ⬆️
python/cudf/cudf/core/column/decimal.py 93.33% <90.47%> (-1.54%) ⬇️
python/cudf/cudf/core/dataframe.py 90.58% <95.00%> (+0.11%) ⬆️
python/cudf/cudf/core/series.py 91.57% <95.55%> (+0.78%) ⬆️
python/cudf/cudf/core/column/string.py 86.76% <100.00%> (+0.26%) ⬆️
python/cudf/cudf/core/indexing.py 96.29% <100.00%> (+0.23%) ⬆️
python/cudf/cudf/io/feather.py 100.00% <0.00%> (ø)
... and 47 more

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 eaec3db...359a66a. Read the comment docs.

@rapids-bot rapids-bot bot merged commit 2488bc8 into rapidsai:branch-0.19 Mar 12, 2021
hyperbolic2346 pushed a commit to hyperbolic2346/cudf that referenced this pull request Mar 25, 2021
…#7575)

This is another fix for `offsets_end()` iterator in lists_column_view. The last fix (rapidsai#7551) was still not correct---that iterator should not be computed using the size of the `offsets()` child column, which is also the offsets of the original (non-sliced) column. Instead, it should be computed using the `size()` of the current column.

Interestingly, my previous fix passed all the unit tests, since thrust does not throw anything (like access violation) when the input range is larger than the output range.

Authors:
  - Nghia Truong (@ttnghia)

Approvers:
  - Jake Hemstad (@jrhemstad)
  - David (@davidwendt)

URL: rapidsai#7575
@ttnghia ttnghia self-assigned this Apr 25, 2021
@ttnghia ttnghia deleted the fix_list_last_offset branch May 3, 2021 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

3 participants