Class TensorObj#

Inheritance Relationships#

Base Types#

Derived Types#

  • public tvm::ffi::details::TensorObjFromDLPack< TDLPackManagedTensor >

  • public tvm::ffi::details::TensorObjFromNDAlloc< TNDAlloc >

Class Documentation#

class TensorObj : public tvm::ffi::Object, public DLTensor#

An object representing a Tensor.

Subclassed by tvm::ffi::details::TensorObjFromDLPack< TDLPackManagedTensor >, tvm::ffi::details::TensorObjFromNDAlloc< TNDAlloc >

Public Functions

inline DLManagedTensor *ToDLPack() const#

Move a Tensor to a DLPack managed tensor.

Returns:

The converted DLPack managed tensor.

inline DLManagedTensorVersioned *ToDLPackVersioned() const#

Move a Tensor to a DLPack managed tensor.

Returns:

The converted DLPack managed tensor.

Protected Static Functions

template<typename TDLManagedTensor>
static inline void DLManagedTensorDeleter(TDLManagedTensor *tensor)#

Deleter for DLManagedTensor.

Parameters:

tensor – The DLManagedTensor to be deleted.

Friends

friend class Tensor