Class TensorObj#
Defined in File tensor.h
Inheritance Relationships#
Base Types#
public tvm::ffi::Object
(Class Object)public DLTensor
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
-
inline DLManagedTensor *ToDLPack() const#