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

Throw an error when libcudf is built without cuFile and LIBCUDF_CUFILE_POLICY is set to "ALWAYS" #12080

Merged

Conversation

vuule
Copy link
Contributor

@vuule vuule commented Nov 5, 2022

Description

Currently, creating a cufile datasource or data_sink silently fails if libcudf was built without the cuFile headers. This is expected behavior when the LIBCUDF_CUFILE_POLICY is not set, or is set to and value other than "ALWAYS". However, with "ALWAYS", there should be no fallback from GDS.
This PR adds a check to fail loudly when LIBCUDF_CUFILE_POLICY=="ALWAYS" cannot be enforced because of missing dependency (cuFile).

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

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

codecov bot commented Nov 5, 2022

Codecov Report

Base: 87.47% // Head: 88.04% // Increases project coverage by +0.56% 🎉

Coverage data is based on head (9051f82) compared to base (f817d96).
Patch has no changes to coverable lines.

❗ Current head 9051f82 differs from pull request most recent head cc5cec8. Consider uploading reports for the commit cc5cec8 to get more accurate results

Additional details and impacted files
@@               Coverage Diff                @@
##           branch-22.12   #12080      +/-   ##
================================================
+ Coverage         87.47%   88.04%   +0.56%     
================================================
  Files               133      135       +2     
  Lines             21826    22025     +199     
================================================
+ Hits              19093    19392     +299     
+ Misses             2733     2633     -100     
Impacted Files Coverage Δ
python/cudf/cudf/core/column/interval.py 85.45% <0.00%> (-9.10%) ⬇️
python/cudf/cudf/io/text.py 91.66% <0.00%> (-8.34%) ⬇️
python/cudf/cudf/core/_base_index.py 81.28% <0.00%> (-4.27%) ⬇️
python/cudf/cudf/io/json.py 92.06% <0.00%> (-2.68%) ⬇️
python/cudf/cudf/utils/utils.py 89.91% <0.00%> (-0.69%) ⬇️
python/cudf/cudf/core/column/timedelta.py 90.17% <0.00%> (-0.58%) ⬇️
python/cudf/cudf/core/column/datetime.py 89.21% <0.00%> (-0.51%) ⬇️
python/cudf/cudf/core/column/column.py 87.96% <0.00%> (-0.46%) ⬇️
python/dask_cudf/dask_cudf/core.py 73.72% <0.00%> (-0.41%) ⬇️
python/cudf/cudf/io/parquet.py 90.45% <0.00%> (-0.39%) ⬇️
... and 37 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@vuule vuule marked this pull request as ready for review November 7, 2022 08:34
@vuule vuule requested a review from a team as a code owner November 7, 2022 08:34
@@ -269,6 +269,10 @@ std::unique_ptr<cufile_input_impl> make_cufile_input(std::string const& filepath
if (cufile_integration::is_always_enabled()) throw;
}
}
#else
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the try-catch still required?
Perhaps whatever is thrown in std::make_unique<cufile_input_impl>(filepath) should just pass through to the caller.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

try-catch is still required because we want to silently fall back to host path if GDS fails and LIBCUDF_CUFILE_POLICY!="ALWAYS" Returning a null is not an error here. We fall back to a different source/sink type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Refactored the PR inspired by your question, less branching now :)

@vuule vuule requested a review from davidwendt November 7, 2022 21:18
@hyperbolic2346
Copy link
Contributor

build

@vuule
Copy link
Contributor Author

vuule commented Nov 7, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit a72627a into rapidsai:branch-22.12 Nov 7, 2022
@vuule vuule deleted the bug-error-always-gds-no-cufile branch November 7, 2022 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change 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.

4 participants