close
The Wayback Machine - https://web.archive.org/web/20220504164837/https://github.com/rapidsai/cudf/issues/10763
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

Open
bdice opened this issue Apr 29, 2022 · 0 comments
Open

Remove mr parameter from inplace bitmask operations. #10763

bdice opened this issue Apr 29, 2022 · 0 comments
Labels
good first issue libcudf

Comments

@bdice
Copy link

@bdice 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 this to Needs prioritizing in Feature Planning via automation May 4, 2022
@bdice bdice added good first issue libcudf labels May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue libcudf
Projects
Feature Planning
Needs prioritizing
Development

No branches or pull requests

1 participant