Skip to content

Commit

Permalink
Merge pull request #3563 from jakirkham/fix_3481
Browse files Browse the repository at this point in the history
Use `__cuda_array_interface__` for serialization
  • Loading branch information
shwina authored Dec 12, 2019
2 parents 4f20c5f + 03bb354 commit 6a26d65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- PR #3550 Update Java package to 0.12
- PR #3549 Fix index name issue with iloc with RangeIndex
- PR #3562 Fix 4GB limit for gzipped-compressed csv files
- PR #3563 Use `__cuda_array_interface__` for serialization


# cuDF 0.11.0 (11 Dec 2019)
Expand Down
5 changes: 4 additions & 1 deletion python/cudf/cudf/core/column/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import numpy as np
import pandas as pd
import pyarrow as pa
from numba import cuda

import nvstrings
import rmm
Expand Down Expand Up @@ -652,7 +653,9 @@ def deserialize(cls, header, frames):
arrays = []

for each_frame in frames:
if isinstance(each_frame, memoryview):
if hasattr(each_frame, "__cuda_array_interface__"):
each_frame = cuda.as_cuda_array(each_frame)
elif isinstance(each_frame, memoryview):
each_frame = np.asarray(each_frame)
each_frame = cudautils.to_device(each_frame)

Expand Down

0 comments on commit 6a26d65

Please sign in to comment.