Skip to content
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

Remove mr parameter from inplace bitmask operations. #10763

Closed
bdice opened this issue Apr 29, 2022 · 0 comments · Fixed by #10805
Closed

Remove mr parameter from inplace bitmask operations. #10763

bdice opened this issue Apr 29, 2022 · 0 comments · Fixed by #10805
Labels
good first issue Good for newcomers libcudf Affects libcudf (C++/CUDA) code.

Comments

@bdice
Copy link
Contributor

bdice commented Apr 29, 2022

The use of an mr parameter in inplace_bitmask_and, which calls inplace_bitmask_binop, is a little misleading. The allocations there are always temporary and are not part of the return value. It is only used for a few temporary arrays/scalars:

rmm::device_scalar<size_type> d_counter{0, stream, mr};
rmm::device_uvector<bitmask_type const*> d_masks(masks.size(), stream, mr);
rmm::device_uvector<size_type> d_begin_bits(masks_begin_bits.size(), stream, mr);

It should be possible to refactor the inplace functions to remove mr as an argument, and instead use the default memory resource. This avoids the implication that the passed mr is used for the returned data (it is not, since it acts in-place on bitmasks passed in that were from some other allocator).

Originally posted by @bdice in #10447 (comment)

@bdice bdice added good first issue Good for newcomers libcudf Affects libcudf (C++/CUDA) code. labels May 4, 2022
rapids-bot bot pushed a commit that referenced this issue May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers libcudf Affects libcudf (C++/CUDA) code.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant