-
Notifications
You must be signed in to change notification settings - Fork 94
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
Fix get_device_memory_ids #1305
Fix get_device_memory_ids #1305
Conversation
StringColumns used to store both the character data and offsets column in their "children" slot which is not inspected by get_device_memory_ids. A recent cudf change moved the character data to the `.data` property, so it now shows up. Adapt expected number of buffers in the test accordingly.
cudf Columns should be treated specially, since they hide device buffers in mask, data, and children properties.
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.
Looks mostly good to me, left a question whether we can make the test more robust.
# Buffers are: | ||
# 1. int data for objects[0].a | ||
# 2. mask data for objects[0].a | ||
# 3. int data for objects[0].b | ||
# 4. int data for objects[0].index | ||
# 5. int data for objects[1].levels[0] | ||
# 6. char data for objects[1].levels[1] | ||
# 7. offset data for objects[1].levels[1] |
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.
Should we assert their types instead of listing them as a comment?
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.
get_device_memory_ids
just gathers DeviceBuffer
s which are untyped. This comment is so that a future reader of the test knows where the magic number 7 comes from.
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.
Sounds good, thanks.
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.
LGTM, thanks @wence-
Thanks @wence- ! |
/merge |
A recent change to the way `StringColumn`s are implemented in cudf threw up that we were never correctly determining the number of device buffers belonging to cudf columns if they had children (e.g. list and struct columns) or masks (any nullable column). Handle those cases and update the test. Authors: - Lawrence Mitchell (https://github.com/wence-) Approvers: - Peter Andreas Entschev (https://github.com/pentschev) - Mads R. B. Kristensen (https://github.com/madsbk) URL: rapidsai#1305
A recent change to the way
StringColumn
s are implemented in cudf threw up that we were never correctly determining the number of device buffers belonging to cudf columns if they had children (e.g. list and struct columns) or masks (any nullable column). Handle those cases and update the test.