hipdf.DataFrame.to_dlpack

hipdf.DataFrame.to_dlpack#

20 min read time

Applies to Linux

DataFrame.to_dlpack()#

Converts a cuDF object into a DLPack tensor.

DLPack is an open-source memory tensor structure: dmlc/dlpack.

This function takes a cuDF object and converts it to a PyCapsule object which contains a pointer to a DLPack tensor. This function deep copies the data into the DLPack tensor from the cuDF object.

Parameters#

cudf_obj : DataFrame, Series, Index, or Column

Returns#

pycapsule_objPyCapsule

Output DLPack tensor pointer which is encapsulated in a PyCapsule object.