Expand description
This module contains the low-level API for dlpack. It was manually
translated from dlpack.h header at version 1.3; and contains types
suitable for use in C FFI.
Structs§
- DLData
Type - The data type the tensor can hold. The data type is assumed to follow the native endian-ness. An explicit error message should be raised when attempting to export an array with non-native endianness
- DLDevice
- A Device for Tensor and operator.
- DLManaged
Tensor - C Tensor object, manage memory of DLTensor. This data structure is intended to facilitate the borrowing of DLTensor by another framework. It is not meant to transfer the tensor. When the borrowing framework doesn’t need the tensor, it should call the deleter to notify the host that the resource is no longer needed.
- DLManaged
Tensor Versioned - A versioned and managed C Tensor object, manage memory of DLTensor.
- DLPack
ExchangeAPI - Framework-specific function pointers table for DLPack exchange.
- DLPack
ExchangeAPI Header - DLPackExchangeAPI stable header.
- DLPack
Version - The DLPack version.
- DLTensor
- Plain C Tensor object, does not manage memory.
Enums§
- DLData
Type Code - The type code options DLDataType.
- DLDevice
Type - The device type in DLDevice.
Constants§
- DLPACK_
FLAG_ BITMASK_ IS_ COPIED - bit mask to indicate that the tensor is a copy made by the producer.
- DLPACK_
FLAG_ BITMASK_ IS_ SUBBYTE_ TYPE_ PADDED - bit mask to indicate that whether a sub-byte type is packed or padded.
- DLPACK_
FLAG_ BITMASK_ READ_ ONLY - bit mask to indicate that the tensor is read only.
- DLPACK_
MAJOR_ VERSION - The current major version of dlpack
- DLPACK_
MINOR_ VERSION - The current minor version of dlpack
Type Aliases§
- DLPack
Current Work Stream - \brief Obtain the current work stream of a device.
- DLPackDL
Tensor From PyObject NoSync - Exports a PyObject* Tensor/NDArray to a provided DLTensor.
- DLPack
Managed Tensor Allocator
- DLPack
Managed Tensor From PyObject NoSync - Exports a PyObject* Tensor/NDArray to a DLManagedTensorVersioned.
- DLPack
Managed Tensor ToPy Object NoSync - Imports a DLManagedTensorVersioned to a PyObject* Tensor/NDArray.