Skip to content

[FEA] Replace use of rmm::device_vector with rmm::device_uvector where possible #7287

Closed

Description

@jrhemstad

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

  1. added
    feature request
    libcudf
    on Feb 3, 2021
  2. vuule commented on Feb 25, 2021

    @vuule
    Contributor

    Volunteered to replace the device_vector in column_buffer. Will do this after #7397 is merged.

  3. davidwendt commented on Feb 25, 2021

    @davidwendt
    Contributor

    Volunteering to replace the device_vector in the cpp/src/strings/ and cpp/src/text/ source files (total about 20 files)

  4. harrism commented on Mar 16, 2021

    @harrism
    Contributor

    Working on replacing device_vector and std::vector with uvector and spans in concatenate.

  5. karthikeyann commented on Mar 16, 2021

    @karthikeyann
    Contributor

    Volunteering to replace the device_vector in groupby. Will do this after #7387 is merged.
    Sort based groupby is already done in #7523

  6. harrism commented on Mar 30, 2021

    @harrism
    Contributor

    Added a checklist. I'm working on gather.

  7. 7 remaining items

  8. harrism commented on May 13, 2021

    @harrism
    Contributor

    The only remaining use of device_vector in libcudf is in span.hpp and its tests.

    Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

feature requestlibcudf

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions