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

Handle sliced struct/list columns properly in concatenate() bounds checking. #8760

Merged
merged 5 commits into from
Jul 20, 2021

Conversation

nvdbaranec
Copy link
Contributor

Fixes #8748

Note: concatenate_tests.cpp was renamed to concatenate_tests.cu because of the addition of some thrust calls.

Existing overflow tests moved to OverflowTest section. New tests specific to this PR are:

Overflowtest.Presliced
OverflowTest.BigColumnsSmallSlices

@nvdbaranec nvdbaranec added bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change labels Jul 16, 2021
@nvdbaranec nvdbaranec requested a review from a team as a code owner July 16, 2021 18:50
@github-actions github-actions bot added the CMake CMake build issue label Jul 16, 2021
cpp/src/copying/concatenate.cu Outdated Show resolved Hide resolved
cpp/src/copying/concatenate.cu Outdated Show resolved Hide resolved
@nvdbaranec nvdbaranec requested a review from a team as a code owner July 19, 2021 16:35
Copy link
Contributor

@ttnghia ttnghia left a comment

Choose a reason for hiding this comment

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

Approve with just one minor comment left 😃

Comment on lines +380 to +382
: cudf::detail::get_value<offset_type>(
scv.offsets(), scv.offset() + b.size(), stream) -
cudf::detail::get_value<offset_type>(scv.offsets(), scv.offset(), stream));
Copy link
Contributor

Choose a reason for hiding this comment

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

Each get_value implicitly calls stream sync. So we have 2 syncs here. I wonder if we need to manually call cudaMemcpy twice, then justs do 1 stream sync for better performance.

@nvdbaranec
Copy link
Contributor Author

rerun tests

@galipremsagar galipremsagar changed the title Handle sliced struct/list columns properly in concatenate() bounds checking. [skip-ci] Handle sliced struct/list columns properly in concatenate() bounds checking. Jul 20, 2021
@galipremsagar galipremsagar changed the title [skip-ci] Handle sliced struct/list columns properly in concatenate() bounds checking. Handle sliced struct/list columns properly in concatenate() bounds checking. Jul 20, 2021
@galipremsagar
Copy link
Contributor

rerun tests

@codecov
Copy link

codecov bot commented Jul 20, 2021

Codecov Report

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

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

@@               Coverage Diff               @@
##             branch-21.08    #8760   +/-   ##
===============================================
  Coverage                ?   10.51%           
===============================================
  Files                   ?      116           
  Lines                   ?    18962           
  Branches                ?        0           
===============================================
  Hits                    ?     1993           
  Misses                  ?    16969           
  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 65a38af...b237724. Read the comment docs.

Comment on lines +735 to +742
thrust::fill(rmm::exec_policy(),
offsets->mutable_view().begin<offset_type>(),
offsets->mutable_view().end<offset_type>(),
list_size);
thrust::exclusive_scan(rmm::exec_policy(),
offsets->view().begin<offset_type>(),
offsets->view().end<offset_type>(),
offsets->mutable_view().begin<offset_type>());
Copy link
Contributor

Choose a reason for hiding this comment

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

You could use std::fill and std::inclusive_scan to fill out a host memory buffer and then cudaMemcpy to the offsets column in order to avoid changing this to .cu file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The numbers in some of these cases are pretty big. I switched to thrust for speed purposes.

@nvdbaranec
Copy link
Contributor Author

rerun tests

cpp/src/copying/concatenate.cu Outdated Show resolved Hide resolved
cpp/src/copying/concatenate.cu Outdated Show resolved Hide resolved
cpp/src/copying/concatenate.cu Outdated Show resolved Hide resolved
@github-actions github-actions bot added the Python Affects Python cuDF API. label Jul 20, 2021
@nvdbaranec
Copy link
Contributor Author

@gpucibot merge

@rapids-bot rapids-bot bot merged commit b490a32 into rapidsai:branch-21.08 Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CMake CMake build issue 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] "RuntimeError: Total number of concatenated rows exceeds size_type range" for 2.2 million row series
7 participants