Skip to content

Commit 08ab384

Browse files
authored
Merge pull request #18145 from rapidsai/branch-25.02
[RELEASE] `v25.02.02`
2 parents b1efe69 + 09ebf31 commit 08ab384

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

python/cudf/cudf/core/df_protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def __dlpack__(self):
105105
# DLPack not implemented in NumPy yet, so leave it out here.
106106
try:
107107
cuda_array = as_cuda_array(self._buf).view(self._dtype)
108-
return cp.asarray(cuda_array).toDlpack()
108+
return cp.asarray(cuda_array).__dlpack__()
109109
except ValueError:
110110
raise TypeError(f"dtype {self._dtype} unsupported by `dlpack`")
111111

python/cudf/cudf/core/subword_tokenizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def _cast_to_appropriate_type(ar, cast_type):
1919
elif cast_type == "tf":
2020
from tensorflow.experimental.dlpack import from_dlpack
2121

22-
return from_dlpack(ar.astype("int32").toDlpack())
22+
return from_dlpack(ar.astype("int32").__dlpack__())
2323

2424

2525
class SubwordTokenizer:

python/cudf/cudf/tests/test_dlpack.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2019-2024, NVIDIA CORPORATION.
1+
# Copyright (c) 2019-2025, NVIDIA CORPORATION.
22

33
import itertools
44
from contextlib import ExitStack as does_not_raise
@@ -140,7 +140,7 @@ def test_to_dlpack_cupy_2d(data_2d):
140140
def test_from_dlpack_cupy_1d(data_1d):
141141
cupy_array = cupy.array(data_1d)
142142
cupy_host_array = cupy_array.get()
143-
dlt = cupy_array.toDlpack()
143+
dlt = cupy_array.__dlpack__()
144144

145145
gs = cudf.from_dlpack(dlt)
146146
cudf_host_array = gs.to_numpy(na_value=np.nan)
@@ -151,7 +151,7 @@ def test_from_dlpack_cupy_1d(data_1d):
151151
def test_from_dlpack_cupy_2d(data_2d):
152152
cupy_array = cupy.array(data_2d, order="F")
153153
cupy_host_array = cupy_array.get().flatten()
154-
dlt = cupy_array.toDlpack()
154+
dlt = cupy_array.__dlpack__()
155155

156156
gdf = cudf.from_dlpack(dlt)
157157
cudf_host_array = np.array(gdf.to_pandas()).flatten()

0 commit comments

Comments
 (0)