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 incorrect slicing of GDS read/write calls #10274

Merged
merged 2 commits into from
Feb 14, 2022

Conversation

vuule
Copy link
Contributor

@vuule vuule commented Feb 12, 2022

Issue happens when the read/write size is a multiple of the maximum slice size. It this case, size of the last slice is computed as 0, instead of max_slice_size:
(t == n_slices - 1) ? size % max_slice_bytes : max_slice_bytes
This PR reimplements this part of code and adds unit tests.

@vuule vuule added bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. cuIO cuIO issue non-breaking Non-breaking change labels Feb 12, 2022
@vuule vuule self-assigned this Feb 12, 2022
@github-actions github-actions bot added the CMake CMake build issue label Feb 12, 2022
@vuule vuule requested a review from devavret February 12, 2022 00:41
@codecov
Copy link

codecov bot commented Feb 12, 2022

Codecov Report

Merging #10274 (71372fb) into branch-22.04 (a7d88cd) will increase coverage by 0.24%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff                @@
##           branch-22.04   #10274      +/-   ##
================================================
+ Coverage         10.42%   10.67%   +0.24%     
================================================
  Files               119      122       +3     
  Lines             20603    20873     +270     
================================================
+ Hits               2148     2228      +80     
- Misses            18455    18645     +190     
Impacted Files Coverage Δ
python/cudf/cudf/_fuzz_testing/fuzzer.py 0.00% <ø> (ø)
python/cudf/cudf/_fuzz_testing/io.py 0.00% <ø> (ø)
python/cudf/cudf/_fuzz_testing/main.py 0.00% <ø> (ø)
python/cudf/cudf/_version.py 0.00% <ø> (ø)
python/cudf/cudf/comm/gpuarrow.py 0.00% <ø> (ø)
python/cudf/cudf/core/_base_index.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/categorical.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/column.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/datetime.py 0.00% <ø> (ø)
python/cudf/cudf/core/column/methods.py 0.00% <ø> (ø)
... and 62 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 48c4dc3...71372fb. Read the comment docs.

@vuule vuule marked this pull request as ready for review February 12, 2022 02:07
@vuule vuule requested a review from a team as a code owner February 12, 2022 02:07
@vuule vuule requested a review from harrism February 12, 2022 02:07
@jjacobelli
Copy link
Contributor

rerun tests

std::vector<file_io_slice> slices;
slices.reserve(n_slices);
std::generate_n(std::back_inserter(slices), n_slices, [&, idx = 0]() mutable {
auto const slice_offset = idx++ * max_slice_size;
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL the value you change in a lambda will stick.

@vuule
Copy link
Contributor Author

vuule commented Feb 14, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit c2846fb into rapidsai:branch-22.04 Feb 14, 2022
@vuule vuule deleted the bug-file-io-slice-size branch March 13, 2023 20:28
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 cuIO cuIO issue libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants