From 6a0483bf70dd73151734fe7643e79a4a74ca5ef4 Mon Sep 17 00:00:00 2001 From: galipremsagar Date: Wed, 11 Dec 2024 16:46:55 +0000 Subject: [PATCH 1/5] update benchmarks --- ucp/benchmarks/cudf_merge.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ucp/benchmarks/cudf_merge.py b/ucp/benchmarks/cudf_merge.py index 07af7b278..8850eb886 100644 --- a/ucp/benchmarks/cudf_merge.py +++ b/ucp/benchmarks/cudf_merge.py @@ -72,8 +72,7 @@ async def recv_df(ep): for frame in frames: await ep.recv(frame) - cudf_typ = pickle.loads(header["type-serialized"]) - return cudf_typ.deserialize(header, frames) + return cudf.Serializable.device_deserialize(header, frames) async def barrier(rank, eps): From 453f3cff16f12e7d7570117fc6bf9b2c113d4d6f Mon Sep 17 00:00:00 2001 From: galipremsagar Date: Wed, 11 Dec 2024 17:28:54 +0000 Subject: [PATCH 2/5] update import --- ucp/benchmarks/cudf_merge.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ucp/benchmarks/cudf_merge.py b/ucp/benchmarks/cudf_merge.py index 8850eb886..78164da51 100644 --- a/ucp/benchmarks/cudf_merge.py +++ b/ucp/benchmarks/cudf_merge.py @@ -39,7 +39,7 @@ import cudf # noqa: E402 import rmm # noqa: E402 from rmm.allocators.cupy import rmm_cupy_allocator # noqa: E402 - +from cudf.core.abc import Serializable def sizeof_cudf_dataframe(df): return int( @@ -72,7 +72,7 @@ async def recv_df(ep): for frame in frames: await ep.recv(frame) - return cudf.Serializable.device_deserialize(header, frames) + return Serializable.device_deserialize(header, frames) async def barrier(rank, eps): From 2a38f317734f8e51d143b8676e4975ca50622a7d Mon Sep 17 00:00:00 2001 From: galipremsagar Date: Wed, 11 Dec 2024 17:31:19 +0000 Subject: [PATCH 3/5] style --- ucp/benchmarks/cudf_merge.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ucp/benchmarks/cudf_merge.py b/ucp/benchmarks/cudf_merge.py index 78164da51..fb30da41f 100644 --- a/ucp/benchmarks/cudf_merge.py +++ b/ucp/benchmarks/cudf_merge.py @@ -38,8 +38,9 @@ import cudf # noqa: E402 import rmm # noqa: E402 -from rmm.allocators.cupy import rmm_cupy_allocator # noqa: E402 from cudf.core.abc import Serializable +from rmm.allocators.cupy import rmm_cupy_allocator # noqa: E402 + def sizeof_cudf_dataframe(df): return int( From 9ca348c5441250a33a77246c0f51051a22fd9f4a Mon Sep 17 00:00:00 2001 From: galipremsagar Date: Wed, 11 Dec 2024 17:34:11 +0000 Subject: [PATCH 4/5] style --- ucp/benchmarks/cudf_merge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ucp/benchmarks/cudf_merge.py b/ucp/benchmarks/cudf_merge.py index fb30da41f..2b577b93a 100644 --- a/ucp/benchmarks/cudf_merge.py +++ b/ucp/benchmarks/cudf_merge.py @@ -38,7 +38,7 @@ import cudf # noqa: E402 import rmm # noqa: E402 -from cudf.core.abc import Serializable +from cudf.core.abc import Serializable # noqa: E402 from rmm.allocators.cupy import rmm_cupy_allocator # noqa: E402 From 43c12b3e2f83f91993ff3e02b75cc4c160cd3d6a Mon Sep 17 00:00:00 2001 From: galipremsagar Date: Wed, 11 Dec 2024 19:02:31 +0000 Subject: [PATCH 5/5] fix serialize call --- ucp/benchmarks/cudf_merge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ucp/benchmarks/cudf_merge.py b/ucp/benchmarks/cudf_merge.py index 2b577b93a..c30ea3520 100644 --- a/ucp/benchmarks/cudf_merge.py +++ b/ucp/benchmarks/cudf_merge.py @@ -49,7 +49,7 @@ def sizeof_cudf_dataframe(df): async def send_df(ep, df): - header, frames = df.serialize() + header, frames = df.device_serialize() header["frame_ifaces"] = [f.__cuda_array_interface__ for f in frames] header = pickle.dumps(header) header_nbytes = np.array([len(header)], dtype=np.uint64)