You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEA] Replace use of rmm::device_vector with rmm::device_uvector where possible #7287
Is your feature request related to a problem? Please describe.
rmm::device_vector is an alias for thrust::device_vector that uses the default memory resource for allocation. Being an alias, we are limited to the function signatures of whatever thrust::device_vector provides. The problem is that thrust::device_vector does not take stream arguments for operations that involve allocations/copies/writes. This leads to problems like #2631.
Describe the solution you'd like
Ideally we'd have a rmm::device_vector that takes stream arguments for every stream ordered operation. However, that would be a significant effort to design and implement such a class.
We may be able to just get away with using rmm::device_uvector instead, as it is its own type with explicit stream arguments for all stream ordered operations. My suspicion is that we can replace (almost) all uses of rmm::device_vector with rmm::device_uvector in libcudf (perhaps with some additional convenience stuff added to rmm::device_uvector).
This issue will track the work to do the conversion of device_vector to device_uvector wherever possible. Here is a current list of modules that contain device_vector today (30 March 2021, branch-0.19):
Describe alternatives you've considered
The alternative is designing and implementing a full-blown, rmm::device_vector class, but that's a lot more work.
Activity
vuule commentedon Feb 25, 2021
Volunteered to replace the
device_vectorincolumn_buffer. Will do this after #7397 is merged.davidwendt commentedon Feb 25, 2021
Volunteering to replace the
device_vectorin thecpp/src/strings/andcpp/src/text/source files (total about 20 files)Refactor strings column factories (#7397)
Change device_vector to device_uvector in nvtext source files (#7512)
Remove unneeded step parameter from strings::detail::copy_slice (#7525)
harrism commentedon Mar 16, 2021
Working on replacing device_vector and std::vector with uvector and spans in concatenate.
karthikeyann commentedon Mar 16, 2021
Volunteering to replace the
device_vectoringroupby. Will do this after #7387 is merged.Sort based groupby is already done in #7523
Use rmm::device_uvector in place of rmm::device_vector for ORC reader…
Convert cudf::concatenate APIs to use spans and device_uvector (#7621)
Change device_vector to device_uvector in nvtext source files (NVIDIA…
Remove unneeded step parameter from strings::detail::copy_slice (NVID…
Cleanup groupby to use host_span, device_span, device_uvector (#7698)
harrism commentedon Mar 30, 2021
Added a checklist. I'm working on gather.
7 remaining items
Use rmm::device_uvector in place of rmm::device_vector for CSV reader…
Convert cudf::rank to use device_uvector (#8029)
Convert cudf::merge to use device_uvector instead of device_vector (#…
Convert cudf::quantiles to use device_uvector (#8076)
Convert cudf::repeat to use device_uvector instead of device_vector (#…
Convert hashing, partitioning, and nested_loop_join APIs to use devic…
Convert unordered_multiset to use device_uvector (#8091)
Convert grouped_rolling to use device_uvector (#8106)
Convert remaining uses of device_vector in groupby (#8148)
Use rmm::device_uvector in place of rmm::device_vector in cuIO (#8151)
Convert tests to use device_uvector (#8205)
Convert benchmarks to use device_uvector (#8208)
harrism commentedon May 13, 2021
The only remaining use of
device_vectorin libcudf is inspan.hppand its tests.Closing.