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] Construct column_view from rmm::device_uvector and device_span #9656
Sometimes, we need to call some API that only accepts column_view input but we only have data stored in rmm::device_uvector (which can implicitly casted into device_span). As a result, we need to construct a column_view from rmm::device_uvector manually like this, in many places:
auto gather_map = column_view(
cudf::data_type{cudf::type_to_id<cudf::size_type>()}, output_size, indices.data());
This is lengthy and error-prone.
A better solution is to add a utility API to do that automatically. Internally, that utility may call type_dispatcher to construct the output column_view depending on the input type.
A better solution is to add a utility API to do that automatically. Internally, that utility may call type_dispatcher to construct the output column_view depending on the input type.
There's no need for a type dispatch here because you already know the type from the device_span.
I think there are plenty of other places where people are constructing a column or column_view from a device_uvector that make this an important and useful thing.
This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.
Activity
ttnghia commentedon Nov 10, 2021
Tag @jrhemstad and @davidwendt as this idea is from you guys and it's great if you can work on it 😄
jrhemstad commentedon Nov 10, 2021
There's no need for a type dispatch here because you already know the type from the
device_span.davidwendt commentedon Nov 11, 2021
Make sure you really need this. If you doing this for calling
cudf::detail::gatherthen you can just pass thedevice_uvectordirectly to https://github.com/rapidsai/cudf/blob/ba2b51dd8f1b1dd0611f90742e0ffb835615cd33/cpp/include/cudf/detail/gather.hpp#L78-L84 which will automatically convert thedevice_uvectorto adevice_span.Example: https://github.com/rapidsai/cudf/blob/ba2b51dd8f1b1dd0611f90742e0ffb835615cd33/cpp/src/copying/copy.cu#L162-L175
jrhemstad commentedon Nov 11, 2021
I think there are plenty of other places where people are constructing a
columnorcolumn_viewfrom adevice_uvectorthat make this an important and useful thing.github-actions commentedon Dec 11, 2021
This issue has been labeled
inactive-30ddue to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeledinactive-90dif there is no activity in the next 60 days.Add conversions between column_view and device_span<T const>. (#10302)