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

Replace defaulted stream value for libcudf APIs that use NVCOMP #10877

Merged
merged 13 commits into from
May 24, 2022

Conversation

jbrennan333
Copy link
Contributor

This PR addresses #10862, but does not completely remove PER_THREAD_DEFAULT_STREAM. I just adds the new define CUDF_USE_PER_THREAD_DEFAULT_STREAM and adds a deprecation warning for PER_THREAD_DEFAULT_STREAM.

This PR also addresses #10864, but only changes the default parameter for read_avro and read_parquet to cudf::default_stream_value, which is defined as rmm::cuda_stream_per_thread when CUDF_USE_PER_THREAD_DEFAULT_STREAM is defined. These cover the current interfaces to nvcomp.

The goal for this PR is to ensure that we pass rmm::cuda_stream_per_thread to the nvcomp apis when CUDF_USE_PER_THREAD_DEFAULT_STREAM is defined. This is needed for nvcomp-2.3, which is provided as dynamic libraries where we cannot recompile with PTDS enabled. nvcomp-2.3 is being enabled in #10851.

I have not marked this PR as closing the above issues, because we will need to follow up in a future PR to remove PER_THREAD_DEFAULT_STREAM and in another to replace all of the rest of the cuDF API call sites to use the new cudf::default_stream_value.

i am putting this up as a draft PR because I have not tested with nvcomp-2.3 yet.

@github-actions github-actions bot added CMake CMake build issue Java Affects Java cuDF API. libcudf Affects libcudf (C++/CUDA) code. labels May 17, 2022
@jbrennan333 jbrennan333 self-assigned this May 17, 2022
@jbrennan333 jbrennan333 added 4 - Needs Review Waiting for reviewer to review or respond ! - Release Performance Performance related issue labels May 17, 2022
@jbrennan333 jbrennan333 added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels May 17, 2022
@jbrennan333
Copy link
Contributor Author

I have verified that this is working in spark by building along with #10851 and then building a spark-rapids-jni and spark-rapids. I then ran a query and verified that ptds is being used. I think this is ready for review.

@jbrennan333
Copy link
Contributor Author

This checkstyle failure does not appear to be due to these changes:

>>>> FAILED: libcudf header existence conda/recipes/libcudf/meta.yaml check; begin output
114d113
<         - test -f $PREFIX/include/cudf/lists/list_view.hpp
>>>> FAILED: libcudf header existence conda/recipes/libcudf/meta.yaml check; end output

Should I fix the meta.yaml file?

@jbrennan333 jbrennan333 marked this pull request as ready for review May 17, 2022 20:51
@jbrennan333 jbrennan333 requested review from a team as code owners May 17, 2022 20:51
Copy link
Contributor

@nvdbaranec nvdbaranec left a comment

Choose a reason for hiding this comment

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

One small comment.

cpp/src/utilities/default_stream.cpp Outdated Show resolved Hide resolved
cpp/tests/utilities_tests/default_stream_tests.cpp Outdated Show resolved Hide resolved
@jbrennan333 jbrennan333 requested a review from a team as a code owner May 17, 2022 21:18
@github-actions github-actions bot added the conda label May 17, 2022
Copy link
Contributor

@nvdbaranec nvdbaranec left a comment

Choose a reason for hiding this comment

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

cpp changes look good.

@codecov
Copy link

codecov bot commented May 17, 2022

Codecov Report

Merging #10877 (a0e4025) into branch-22.06 (54789ee) will increase coverage by 0.02%.
The diff coverage is 93.75%.

❗ Current head a0e4025 differs from pull request most recent head 8d070e3. Consider uploading reports for the commit 8d070e3 to get more accurate results

@@               Coverage Diff                @@
##           branch-22.06   #10877      +/-   ##
================================================
+ Coverage         86.30%   86.32%   +0.02%     
================================================
  Files               144      144              
  Lines             22665    22668       +3     
================================================
+ Hits              19560    19569       +9     
+ Misses             3105     3099       -6     
Impacted Files Coverage Δ
python/cudf/cudf/core/indexed_frame.py 91.70% <ø> (ø)
python/cudf/cudf/utils/ioutils.py 79.47% <87.50%> (-0.13%) ⬇️
python/cudf/cudf/io/avro.py 78.57% <100.00%> (ø)
python/cudf/cudf/io/csv.py 91.80% <100.00%> (ø)
python/cudf/cudf/io/json.py 97.56% <100.00%> (ø)
python/cudf/cudf/io/orc.py 92.77% <100.00%> (ø)
python/cudf/cudf/io/parquet.py 90.83% <100.00%> (ø)
python/cudf/cudf/io/text.py 100.00% <100.00%> (ø)
python/cudf/cudf/core/dataframe.py 93.78% <0.00%> (+0.04%) ⬆️
python/cudf/cudf/core/column/string.py 88.78% <0.00%> (+0.12%) ⬆️
... and 4 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 1db83e3...8d070e3. Read the comment docs.

Copy link
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

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

Ignore me.

@jbrennan333
Copy link
Contributor Author

I have updated based on review comments from @jrhemstad and @vuule. I really appreciate all the reviews/comments.

@jbrennan333
Copy link
Contributor Author

@jrhemstad, @vuule, this is ready for another review.

Copy link
Contributor

@vuule vuule left a comment

Choose a reason for hiding this comment

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

cuIO changes look good, thank you for addressing the feedback.

@vuule vuule added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 4 - Needs Review Waiting for reviewer to review or respond labels May 20, 2022
cpp/CMakeLists.txt Outdated Show resolved Hide resolved
java/src/main/native/CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Contributor

@robertmaynard robertmaynard left a comment

Choose a reason for hiding this comment

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

CMake changes LGTM

@jbrennan333
Copy link
Contributor Author

Since we are going forward with including nvcomp-2.3 in 22.06, I think this can be merged now.

@nvdbaranec
Copy link
Contributor

@gpucibot merge

@rapids-bot rapids-bot bot merged commit e096345 into rapidsai:branch-22.06 May 24, 2022
rapids-bot bot pushed a commit that referenced this pull request Jun 22, 2022
…fault_stream_value (#11082)

Closes #10864.
Also closes #9614.

This PR is a follow-up to #10877.  It replaces all of the remaining instances of `rmm::cuda_stream_default` with `cudf::default_stream_value`.

There are a lot of replacements and addition of includes, along with some reformatting due to clang-format, but like #10877, there should be no noticeable functional change here.

Authors:
  - Jim Brennan (https://github.com/jbrennan333)

Approvers:
  - Robert (Bobby) Evans (https://github.com/revans2)
  - https://github.com/nvdbaranec
  - Nghia Truong (https://github.com/ttnghia)
  - Karthikeyan (https://github.com/karthikeyann)

URL: #11082
rapids-bot bot pushed a commit that referenced this pull request Jun 23, 2022
Closes #10862.

The `PER_THREAD_DEFAULT_STREAM` build option was deprecated in branch-22.06 via #10877, and replaced with the new build option `CUDF_USE_PER_THREAD_DEFAULT_STREAM`.

This PR removes `PER_THREAD_DEFAULT_STREAM`.

I am putting this up as a draft because I am not certain if we want to do this in 22.08 or wait for a later release?

Authors:
  - Jim Brennan (https://github.com/jbrennan333)

Approvers:
  - Jason Lowe (https://github.com/jlowe)
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #11134
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge CMake CMake build issue improvement Improvement / enhancement to an existing function Java Affects Java cuDF API. libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Performance Performance related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants