Skip to content

Commit

Permalink
Update python/dask_cudf/dask_cudf/backends.py
Browse files Browse the repository at this point in the history
Co-authored-by: Mads R. B. Kristensen <[email protected]>
  • Loading branch information
vyasr and madsbk authored Nov 11, 2021
1 parent 4373a95 commit e5d726b
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions python/dask_cudf/dask_cudf/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,11 @@ def group_split_cudf(df, c, k, ignore_index=False):
)


@sizeof_dispatch.register_lazy("cudf")
def register_cudf():
@sizeof_dispatch.register((cudf.DataFrame))
def sizeof_cudf_dataframe(df):
return int(df.memory_usage().sum())

@sizeof_dispatch.register((cudf.Series, cudf.BaseIndex))
def sizeof_cudf_series_index(obj):
return obj.memory_usage()
@sizeof_dispatch.register(cudf.DataFrame)
def sizeof_cudf_dataframe(df):
return int(df.memory_usage().sum())


@sizeof_dispatch.register((cudf.Series, cudf.BaseIndex))
def sizeof_cudf_series_index(obj):
return obj.memory_usage()

0 comments on commit e5d726b

Please sign in to comment.