interop#
- class pylibcudf.interop.ColumnMetadata(name: str = '', timezone: str = '', precision: int | None = None, children_meta: list[~pylibcudf._interop_helpers.ColumnMetadata] = <factory>)#
Metadata associated with a column.
This is the Python representation of
cudf::column_metadata.Attributes
precision
- pylibcudf.interop.from_dlpack(managed_tensor, Stream stream=None, DeviceMemoryResource mr=None) Table#
Convert a DLPack DLTensor into a cudf table.
For details, see
from_dlpack()- Parameters:
- managed_tensorPyCapsule
A 1D or 2D column-major (Fortran order) tensor.
- streamStream | None
CUDA stream on which to perform the operation.
- mrDeviceMemoryResource | None
Device memory resource used to allocate the returned table’s device memory.
- Returns:
- Table
Table with a copy of the tensor data.
- pylibcudf.interop.to_dlpack(Table input, Stream stream=None, DeviceMemoryResource mr=None)#
Convert a cudf table into a DLPack DLTensor.
For details, see
to_dlpack()- Parameters:
- inputTable
A 1D or 2D column-major (Fortran order) tensor.
- streamStream | None
CUDA stream on which to perform the operation.
- mrDeviceMemoryResource | None
Device memory resource used to allocate the returned DLPack tensor’s device memory.
- Returns:
- PyCapsule
1D or 2D DLPack tensor with a copy of the table data, or nullptr.