-
Notifications
You must be signed in to change notification settings - Fork 933
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 scatter_by_map with spilling enabled #18095
Fix scatter_by_map with spilling enabled #18095
Conversation
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.
Thanks! One non-blocking suggestion
@acquire_spill_lock() | ||
def split_from_pylibcudf(split: list[plc.Column]) -> list[ColumnBase]: | ||
return [ColumnBase.from_pylibcudf(col) for col in split] | ||
|
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.
Does this work?
@acquire_spill_lock() | |
def split_from_pylibcudf(split: list[plc.Column]) -> list[ColumnBase]: | |
return [ColumnBase.from_pylibcudf(col) for col in split] | |
with acquire_spill_lock() | |
columns = [ColumnBase.from_pylibcudf(col) for col in split] |
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.
split
here is an iterator variable (from for split in columns_split
) below.
So in order to do it like this I would have to do
with acquire_spill_lock():
column = [[ColumnBase.from_pylibcudf(col) for col in split] for split in columns_split]
I could put the entire operation in the with acquire_spill_lock()
block, but I would prefer tightly scope the operation that definitely needs the spill lock.
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.
Oh thanks I didn't see the for split in
. Sounds good
return [ | ||
self._from_columns_like_self( | ||
[ColumnBase.from_pylibcudf(col) for col in split], | ||
split_from_pylibcudf(split), |
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.
split_from_pylibcudf(split), | |
columns, |
/merge |
d8b3d80
into
rapidsai:branch-25.04
Description
closes #18088
Before the old Cython bindings of
columns_split
spill locked the conversion from libcudf to a cudf Python column. When I replaced these bindings, this spill locking was removed during the refactor.I'm spot checking that other APIs are not affected. If so I can open PRs for those
Checklist