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

Use cuFile direct device reads/writes by default in cuIO #9722

Merged
merged 15 commits into from
Nov 19, 2021

Conversation

vuule
Copy link
Contributor

@vuule vuule commented Nov 18, 2021

Making this change early in 22.02 to test through internal use + nightly builds before the release.

  • Modify the way cuFile integration is enabled to match the nvCOMP integration.
  • Change the default from OFF to GDS (GDS on, only for direct reads/writes, no compatibility mode).
  • cuFile JSON config file is now modified on first cuFile use (same time as the driver), instead of the first query that checks if GDS use is enabled.

@vuule vuule added cuIO cuIO issue improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Nov 18, 2021
@vuule vuule self-assigned this Nov 18, 2021
@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Nov 18, 2021
@codecov
Copy link

codecov bot commented Nov 18, 2021

Codecov Report

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

Impacted file tree graph

@@               Coverage Diff               @@
##             branch-22.02    #9722   +/-   ##
===============================================
  Coverage                ?   10.49%           
===============================================
  Files                   ?      119           
  Lines                   ?    20305           
  Branches                ?        0           
===============================================
  Hits                    ?     2130           
  Misses                  ?    18175           
  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 32bacfa...8c38454. Read the comment docs.

@vuule vuule marked this pull request as ready for review November 18, 2021 06:04
@vuule vuule requested a review from a team as a code owner November 18, 2021 06:04
@vuule vuule requested review from vyasr and davidwendt November 18, 2021 06:04
Copy link
Contributor

@davidwendt davidwendt left a comment

Choose a reason for hiding this comment

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

Seems changing the default for LIBCUDF_CUFILE_POLICY would qualify this as a breaking change?

while (std::getline(user_config_file, line)) {
std::string const tag = "\"allow_compat_mode\"";
if (line.find(tag) != std::string::npos) {
// TODO: only replace the true/false value
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like the fact the file is overwritten and not actually modified should be documented in the .rst somehow.

cpp/src/io/utilities/config_utils.hpp Outdated Show resolved Hide resolved
@kkraus14
Copy link
Collaborator

FYI -- I recently upgraded my dev environment to CUDA 11.5 via the runfile and it seems like neither the runfile nor conda packages (either provided by NVIDIA or in conda-forge) currently include libcufile or its headers which will likely break quite a lot of users if we make this required and/or the default.

@vuule
Copy link
Contributor Author

vuule commented Nov 18, 2021

Seems changing the default for LIBCUDF_CUFILE_POLICY would qualify this as a breaking change?

I don't know. The change does not break any code. I'm okay with changing the label (whose description, btw, is not helpful here :D).

@vuule
Copy link
Contributor Author

vuule commented Nov 18, 2021

FYI -- I recently upgraded my dev environment to CUDA 11.5 via the runfile and it seems like neither the runfile nor conda packages (either provided by NVIDIA or in conda-forge) currently include libcufile or its headers which will likely break quite a lot of users if we make this required and/or the default.

I don't see how this would break cudf for users. This PR does not make cufile a requirement. If the headers are not present during compilation, we will compile without any cufile capability. If the library is not present at runtime, we will detect an issue when loading it and fall back to the host path. Even if something goes wrong when opening a file with cufile, we fall back to the host path.

Thank you for bringing this up, will look into whether cufile should be included in the packages.

@kkraus14
Copy link
Collaborator

I don't see how this would break cudf for users. This PR does not make cufile a requirement. If the headers are not present during compilation, we will compile without any cufile capability. If the library is not present at runtime, we will detect an issue when loading it and fall back to the host path. Even if something goes wrong when opening a file with cufile, we fall back to the host path.

Apologies, I misread the code. Awesome to see this moving forward 😄

@davidwendt
Copy link
Contributor

Seems changing the default for LIBCUDF_CUFILE_POLICY would qualify this as a breaking change?

I don't know. The change does not break any code. I'm okay with changing the label (whose description, btw, is not helpful here :D).

I thought 'breaking' was a way to communicate that we are changing a default or a previously documented behavior.

@vuule vuule added breaking Breaking change and removed non-breaking Non-breaking change labels Nov 19, 2021
Copy link
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

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

Happy to see this happening! Mostly looks good, just a few minor suggestions before we push this out.

cpp/src/io/utilities/config_utils.hpp Outdated Show resolved Hide resolved
cpp/src/io/utilities/config_utils.hpp Outdated Show resolved Hide resolved
cpp/src/io/utilities/file_io_utilities.cpp Outdated Show resolved Hide resolved
docs/cudf/source/basics/io-gds-integration.rst Outdated Show resolved Hide resolved
docs/cudf/source/basics/io-gds-integration.rst Outdated Show resolved Hide resolved
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.

Overall this looks good! I have some comments on docs. 📜

cpp/src/io/utilities/config_utils.hpp Outdated Show resolved Hide resolved
cpp/src/io/utilities/config_utils.hpp Outdated Show resolved Hide resolved
cpp/src/io/utilities/config_utils.hpp Outdated Show resolved Hide resolved
cpp/src/io/utilities/file_io_utilities.cpp Outdated Show resolved Hide resolved
docs/cudf/source/basics/io-gds-integration.rst Outdated Show resolved Hide resolved
docs/cudf/source/basics/io-gds-integration.rst Outdated Show resolved Hide resolved
Co-authored-by: Bradley Dice <[email protected]>
Co-authored-by: Vyas Ramasubramani <[email protected]>
@vuule vuule requested a review from a team as a code owner November 19, 2021 20:23
@github-actions github-actions bot added the CMake CMake build issue label Nov 19, 2021
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.

Two minor typos, otherwise LGTM. 👍

cpp/src/io/utilities/config_utils.hpp Outdated Show resolved Hide resolved
docs/cudf/source/basics/io-gds-integration.rst Outdated Show resolved Hide resolved
@vuule vuule requested a review from vyasr November 19, 2021 21:15
@vyasr
Copy link
Contributor

vyasr commented Nov 19, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit f0367c0 into rapidsai:branch-22.02 Nov 19, 2021
rapids-bot bot pushed a commit that referenced this pull request Nov 22, 2021
Signed-off-by: Peixin Li <[email protected]>

related to #9722 
skip cufile test in JNI build while we have a separate pipeline for GDS testing

Authors:
  - Peixin (https://github.com/pxLi)

Approvers:
  - Tim Liu (https://github.com/NvTimLiu)
  - Gary Shen (https://github.com/GaryShen2008)

URL: #9744
@vuule vuule deleted the fea-use-gds-default branch April 20, 2022 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change CMake CMake build issue cuIO cuIO issue improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants