-
Notifications
You must be signed in to change notification settings - Fork 983
batched_memset to use a host_span arg instead of std::vector
#19020
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
batched_memset to use a host_span arg instead of std::vector
#19020
Conversation
| /** | ||
| * @brief A helper function that copies a vector of vectors from source to destination addresses in | ||
| * a batched manner. | ||
| * @brief Helper to batched memcpy specified numbers of bytes from source device iterators to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor improvement to docstring here
| bool has_lists = false; | ||
| // Casting to std::byte since data buffer pointer is void * | ||
| std::vector<cudf::device_span<std::byte>> memset_bufs; | ||
| std::vector<cudf::device_span<cuda::std::byte>> memset_bufs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using cuda::std::byte for proper device compatibility
| TEST(MultiBufferTestIntegral, BasicTest1) | ||
| { | ||
| std::vector<size_t> const BUF_SIZES{ | ||
| std::vector<size_t> const buffer_sizes{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style
|
/merge |
…19020) Related to #18968 (comment) This PR updates the `batched_memset` cuIO utility to take in a `host_span` type argument instead of a `std::vector` to allow using `cudf::host_vectors` or `cudf::pinned_vectors` in the future as input. Authors: - Muhammad Haseeb (https://github.com/mhaseeb123) Approvers: - David Wendt (https://github.com/davidwendt) - Bradley Dice (https://github.com/bdice) URL: #19020
Description
Related to #18968 (comment)
This PR updates the
batched_memsetcuIO utility to take in ahost_spantype argument instead of astd::vectorto allow usingcudf::host_vectorsorcudf::pinned_vectorsin the future as input.Checklist