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 branch_stack calculation in row_bit_count() #9076

Merged

Conversation

mythrocks
Copy link
Contributor

@mythrocks mythrocks commented Aug 19, 2021

Fixes #8938.

For input with a number of rows exceeding max_block_size, row_bit_count() currently
reaches past the bounds of its shared-memory allocation, causing illegal memory access
errors like in cudf/issues/8938.

This commit corrects the calculation of the branch stack's base address, and adds a
test for this case.

For input with a number of rows exceeding  `max_block_size`, `row_bit_count()` currently
reaches past the bounds of its shared-memory allocation, causing illegal memory access
errors like in (cudf/issues/8938)[rapidsai#8938].

This commit corrects the calculation of the branch stack's base address, and adds a
test for this case.
@mythrocks mythrocks requested a review from nvdbaranec August 19, 2021 21:20
@mythrocks mythrocks requested a review from a team as a code owner August 19, 2021 21:20
@mythrocks mythrocks self-assigned this Aug 19, 2021
@mythrocks mythrocks requested a review from karthikeyann August 19, 2021 21:20
@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Aug 19, 2021
@nvdbaranec
Copy link
Contributor

Good fix. Thanks.

@mythrocks mythrocks added 3 - Ready for Review Ready for review by team 4 - Needs Review Waiting for reviewer to review or respond bug Something isn't working improvement Improvement / enhancement to an existing function non-breaking Non-breaking change and removed libcudf Affects libcudf (C++/CUDA) code. labels Aug 19, 2021
Copy link
Contributor

@nvdbaranec nvdbaranec left a comment

Choose a reason for hiding this comment

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

Just one small note about potentially choosing a row count that will blow any reasonable block size limit.

cpp/tests/transform/row_bit_count_test.cu Outdated Show resolved Hide resolved
@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Aug 20, 2021
@mythrocks mythrocks removed the improvement Improvement / enhancement to an existing function label Aug 20, 2021
@mythrocks mythrocks requested a review from nvdbaranec August 20, 2021 17:48
@codecov
Copy link

codecov bot commented Aug 20, 2021

Codecov Report

❗ No coverage uploaded for pull request base (branch-21.10@abe57f8). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head 7308ccd differs from pull request most recent head eeca5b7. Consider uploading reports for the commit eeca5b7 to get more accurate results
Impacted file tree graph

@@               Coverage Diff               @@
##             branch-21.10    #9076   +/-   ##
===============================================
  Coverage                ?   10.73%           
===============================================
  Files                   ?      114           
  Lines                   ?    19058           
  Branches                ?        0           
===============================================
  Hits                    ?     2046           
  Misses                  ?    17012           
  Partials                ?        0           

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 abe57f8...eeca5b7. Read the comment docs.

@mythrocks
Copy link
Contributor Author

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 8aefeb4 into rapidsai:branch-21.10 Aug 23, 2021
@mythrocks
Copy link
Contributor Author

Thanks for the reviews, chaps. I've merged this change now.

@mythrocks mythrocks deleted the fix-row-bit-count-branch-stack branch November 23, 2021 22:05
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 4 - Needs Review Waiting for reviewer to review or respond 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.

[BUG] row_bit_count produces Illegal memory acces on some data sets
4 participants