Skip to content

Conversation

@mhaseeb123
Copy link
Member

@mhaseeb123 mhaseeb123 commented May 28, 2025

Description

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.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@mhaseeb123 mhaseeb123 requested a review from a team as a code owner May 28, 2025 22:40
@mhaseeb123 mhaseeb123 requested review from davidwendt and devavret May 28, 2025 22:40
@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label May 28, 2025
@mhaseeb123 mhaseeb123 added 3 - Ready for Review Ready for review by team cuIO cuIO issue improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels May 28, 2025
/**
* @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
Copy link
Member Author

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;
Copy link
Member Author

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{
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style

@mhaseeb123 mhaseeb123 added 4 - Needs Review Waiting for reviewer to review or respond and removed 3 - Ready for Review Ready for review by team labels May 28, 2025
@mhaseeb123 mhaseeb123 added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 4 - Needs Review Waiting for reviewer to review or respond labels May 28, 2025
@mhaseeb123
Copy link
Member Author

/merge

@rapids-bot rapids-bot bot merged commit 4832834 into rapidsai:branch-25.08 May 29, 2025
91 checks passed
@mhaseeb123 mhaseeb123 deleted the improve/batched-memset branch May 29, 2025 22:45
copy-pr-bot bot pushed a commit that referenced this pull request May 30, 2025
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 - Ready to Merge Testing and reviews complete, ready to merge cuIO cuIO issue improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants