-
Notifications
You must be signed in to change notification settings - Fork 884
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
[FEA] Replace defaulted stream value in libcudf APIs with cudf::cuda_default_stream
#10864
Comments
In terms of the build process, would this still be keyed off of |
See #10862 TL;DR
|
Clarification: The rmm name is |
I was actually considering an alternative that would perhaps be less ambiguous. "default stream" is ambiguous because it could mean "The CUDA default stream" or "the default value of the stream parameter in every function". Really, we want the latter. It's a subtle and pedantic difference, but one I think that is important. Therefore, something like |
Thanks @jrhemstad! |
I put up PR #10877 for this. It only replaces |
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. Authors: - Jim Brennan (https://github.com/jbrennan333) Approvers: - https://github.com/nvdbaranec - AJ Schmidt (https://github.com/ajschmidt8) - Jason Lowe (https://github.com/jlowe) - Vukasin Milovanovic (https://github.com/vuule) - Jake Hemstad (https://github.com/jrhemstad) - Robert Maynard (https://github.com/robertmaynard) URL: #10877
This issue has been labeled |
This issue is still in progress. The remaining work is covered by #11082. |
…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
Is your feature request related to a problem? Please describe.
libcudf public APIs do not current expose CUDA stream arguments (#925).
However, every public API internally invokes a corresponding
detail::
API that has armm::cuda_stream_view
parameter defaulted tormm::cuda_stream_default
.I would like to be able to globally control this default value at the scope of libcudf (meaning, not changing it at the RMM level which could be much broader).
Describe the solution you'd like
Add a global
cudf::cuda_default_stream
much like thermm::cuda_default_stream
and replace every use of
rmm::cuda:default_stream
withcudf::cuda_default_stream
.Furthermore, I would like the value of this
cudf::cuda_default_stream
to depend on theCUDF_USE_PER_THREAD_DEFAULT_STREAM
option.Additional Context
I explicitly made the configuration of
cuda_default_stream
's value depend on the cudf specificCUDF_USE_PER_THREAD_DEFAULT_STREAM
option instead of theCUDA_API_PER_THREAD_DEFAULT_STREAM
option even though the former implies the latter.This is to minimize potential astonishment. If someone were to compile libcudf manually using
--default-stream per-thread
they would not expect the behavior described above. The behavior above requires opting in explicitly through the cudf specific option.The text was updated successfully, but these errors were encountered: