-
Notifications
You must be signed in to change notification settings - Fork 948
pylibcudf.Column: add device_buffer_size
and register a dask.sizeof function for cudf-polars Column and DataFrame
#18602
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
Merged
rapids-bot
merged 21 commits into
rapidsai:branch-25.06
from
madsbk:sizeof_polars_dataframe
May 6, 2025
Merged
Changes from 4 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
2689006
Register a sizeof function for Column and DataFrame
madsbk d2febbb
dask_registers.py
madsbk 5183e35
rename SerializerManager => DaskRegisterManager
madsbk a589761
tests
madsbk 2b30128
device_buffer_size
madsbk d175192
typo
madsbk 14c6b14
Merge branch 'branch-25.06' of github.com:rapidsai/cudf into sizeof_p…
madsbk b461a10
pylibcudf.Column: adding device_buffer_size
madsbk 522e566
cudf-polars use pylibcudf's device_buffer_size
madsbk 12c9fff
doc
madsbk 78b2698
Apply suggestions from code review
madsbk c9976e9
Apply suggestions from code review
madsbk 018a9de
gpumemoryview: adding buffer_size
madsbk ef6e891
_datatype_from_dtype_desc
madsbk fdf9be0
clean up
madsbk 7e5321b
test sizeof columns
madsbk d6aca71
doc
madsbk e827b08
Update python/pylibcudf/pylibcudf/column.pyx
madsbk 12c4e11
Merge branch 'branch-25.06' into sizeof_polars_dataframe
madsbk e8613b1
doc: ignore uint64_t
madsbk 28957ac
Merge branch 'branch-25.06' into sizeof_polars_dataframe
madsbk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
from __future__ import annotations | ||
|
||
import pyarrow as pa | ||
import pytest | ||
from dask.sizeof import sizeof | ||
|
||
import pylibcudf as plc | ||
|
||
from cudf_polars.containers import DataFrame | ||
from cudf_polars.experimental.dask_registers import register | ||
|
||
# Must register sizeof dispatch before running tests | ||
register() | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"arrow_tbl, size", | ||
[ | ||
(pa.table([]), 0), | ||
(pa.table({"a": [1, 2, 3], "b": [4, 5, 6], "c": [7, 8, 9]}), 9 * 8), | ||
(pa.table({"a": [1, 2, 3]}), 3 * 8), | ||
(pa.table({"a": [1], "b": [2], "c": [3]}), 3 * 8), | ||
(pa.table({"a": [1, 2, None]}), 88), | ||
], | ||
) | ||
def test_dask_sizeof(arrow_tbl, size): | ||
plc_tbl = plc.interop.from_arrow(arrow_tbl) | ||
df = DataFrame.from_table(plc_tbl, names=arrow_tbl.column_names) | ||
assert sizeof(df) == size |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.