Modules§
- Raw bindings for DLPack.
- Imports the structs and traits for you to implement
IntoDLPack
andFromDLPack
.
Structs§
- Safe wrapper for DLManagedTensor. Will call deleter when dropped.
- The ManagerCtx holds the Tensor and its metadata.
Enums§
- If the shape or strides of Tensor is vec of i64, then it should be borrowed to avoid copy. The lifetime should be ’static since we don’t managed its memory. Otherwise, we should copy the data and convert its type to i64 and managed it ourselves.
Traits§
- Make Tensor from
DLPack
- Infer DataType from generic parameter.
- Convert into
DLPack
- Access Tensor data.
- User should implement this trait for their tensor.
Type Aliases§
- DLPack is a data structure that can be used to describe tensor data. It’s a pointer to a DLManagedTensor.