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

Batch of fixes for index overflows in grid stride loops. #10448

Merged
merged 10 commits into from
Mar 23, 2022

Conversation

nvdbaranec
Copy link
Contributor

Partially addresses #10368

Specifically:

  • valid_if
  • scatter
  • rolling_window
  • compute_column_kernel (ast stuff)
  • replace_nulls (fixed-width and strings)

The majority of the fixes are simply making the indexing variable a std::size_t instead of a cudf::size_type. Although scatter had an additional place it was overflowing outside the kernel.

I didn't add tests for these fixes, but each of them were individually tested locally to make sure they actually manifested the issue and then were verified with the fixes.

@nvdbaranec nvdbaranec added bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change labels Mar 17, 2022
@nvdbaranec nvdbaranec requested a review from a team as a code owner March 17, 2022 00:49
cpp/src/copying/scatter.cu Show resolved Hide resolved
cpp/include/cudf/detail/valid_if.cuh Outdated Show resolved Hide resolved
cpp/src/rolling/jit/kernel.cu Outdated Show resolved Hide resolved
cpp/src/transform/compute_column.cu Show resolved Hide resolved
cpp/src/rolling/rolling_detail.cuh Outdated Show resolved Hide resolved
cpp/src/rolling/jit/kernel.cu Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 21, 2022

Codecov Report

Merging #10448 (e1bdea4) into branch-22.04 (4596244) will increase coverage by 0.03%.
The diff coverage is n/a.

@@               Coverage Diff                @@
##           branch-22.04   #10448      +/-   ##
================================================
+ Coverage         86.13%   86.17%   +0.03%     
================================================
  Files               139      141       +2     
  Lines             22438    22501      +63     
================================================
+ Hits              19328    19391      +63     
  Misses             3110     3110              
Impacted Files Coverage Δ
python/cudf/cudf/core/column_accessor.py 93.47% <0.00%> (-3.24%) ⬇️
python/cudf/cudf/core/column/decimal.py 91.30% <0.00%> (-1.01%) ⬇️
python/cudf/cudf/core/column/timedelta.py 90.45% <0.00%> (-0.94%) ⬇️
python/cudf/cudf/core/column/datetime.py 88.51% <0.00%> (-0.57%) ⬇️
python/cudf/cudf/core/_base_index.py 85.92% <0.00%> (-0.51%) ⬇️
python/cudf/cudf/core/column/categorical.py 89.63% <0.00%> (-0.29%) ⬇️
python/cudf/cudf/core/single_column_frame.py 96.85% <0.00%> (-0.17%) ⬇️
python/dask_cudf/dask_cudf/__init__.py 82.35% <0.00%> (ø)
python/dask_cudf/dask_cudf/io/tests/test_orc.py 100.00% <0.00%> (ø)
python/dask_cudf/dask_cudf/tests/test_accessor.py 98.41% <0.00%> (ø)
... and 21 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 4596244...e1bdea4. Read the comment docs.

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.

I'm approving because this fixes bugs and would improve the stability/functionality of the 22.04 release. There's still some further investigation needed to make these kinds of changes more thoroughly through the code base and/or adopt alternative strategies such as range-based for loops or a grid helper, but those shouldn't hold back the 22.04 release and can be done in later PRs.

@nvdbaranec nvdbaranec added the 5 - DO NOT MERGE Hold off on merging; see PR for details label Mar 21, 2022
@nvdbaranec
Copy link
Contributor Author

Just as a note: I'm currently fighting the jit compiler trying to change a couple of the casts as discussed with @bdice. It's either crashing or failing to compile with no output for some reason.

@nvdbaranec nvdbaranec removed the 5 - DO NOT MERGE Hold off on merging; see PR for details label Mar 22, 2022
@bdice
Copy link
Contributor

bdice commented Mar 22, 2022

rerun tests

@nvdbaranec
Copy link
Contributor Author

@gpucibot merge

1 similar comment
@nvdbaranec
Copy link
Contributor Author

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 5129ee5 into rapidsai:branch-22.04 Mar 23, 2022
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.

5 participants