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

Support the new Buffer in cudf #1033

Merged
merged 1 commit into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions dask_cuda/get_device_memory_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ def get_device_memory_objects_default(obj):
return dispatch(obj._pxy_get().obj)
if hasattr(obj, "data"):
return dispatch(obj.data)
if hasattr(obj, "_owner") and obj._owner is not None:
return dispatch(obj._owner)
owner = getattr(obj, "owner", None) or getattr(obj, "_owner", None)
if owner:
return dispatch(owner)
if hasattr(obj, "__cuda_array_interface__"):
return [obj]
return []
Expand Down
2 changes: 1 addition & 1 deletion dask_cuda/tests/test_proxify_host_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def test_dataframes_share_dev_mem():
# Even though the two dataframe doesn't point to the same cudf.Buffer object
assert view1["a"].data is not view2["a"].data
# They still share the same underlying device memory
assert view1["a"].data._owner._owner is view2["a"].data._owner._owner
view1["a"].data.ptr == view2["a"].data.ptr

dhf = ProxifyHostFile(
local_directory=root_dir, device_memory_limit=160, memory_limit=1000
Expand Down