Open nvdbaranec opened 2 years ago
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.
This reminds me of the string column factory discussion in #5150. @nvdbaranec would you please post a snippet showing what you have in mind?
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.
This reminds me of the string column factory discussion in #5150. @nvdbaranec would you please post a snippet showing what you have in mind?
Late reply. Snippet would pretty much be exactly like David's example in your link,
template <typename Iterator>
rmm::device_uvector<T> make_device_uvector_async(
Iterator values_begin, Iterator values_end,
rmm::cuda_stream_view stream = cudf::default_stream_value,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource())
Would you be able to find any examples you mention in the description?
Are you saying device data is being copied into a std::vector
to build a device_uvector
?
No, just that we have a lot of cases where the input is expressed as an iterator that the user has to manually put in a std::vector
before calling the host_span
overload. If you could just pass the iterators and let the function do the staging it would cut down on some clutter.
I believe the specific example was this, but it's pretty common in the code.
Although I guess I did specify (device) in the description. Those would be useful as well, though maybe only applicable in limited circumstances.
Sorry, this does not make sense to me. The iterator is for host data then?
There is no shortcut here.
The data would need to be copied to a host vector (i.e. std::vector
) before creating a device_uvector
.
The iterator version does not help solve this fact.
Ran into some code in a PR that was staging results into a std::vector just so that it could be passed to a factory function. Seems like it would be useful to have versions that take (device) iterators directly.