tvm
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
tvm::relax::TensorStructInfoNode Class Reference

StructInfo of Tensor. More...

#include <struct_info.h>

Inheritance diagram for tvm::relax::TensorStructInfoNode:
Collaboration diagram for tvm::relax::TensorStructInfoNode:

Public Member Functions

bool IsUnknownNdim () const
 
bool IsUnknownDtype () const
 
ffi::Optional< ffi::Array< PrimExpr > > GetShape () const
 
 TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("relax.TensorStructInfo", TensorStructInfoNode, StructInfoNode)
 
- Public Member Functions inherited from tvm::relax::StructInfoNode
 TVM_FFI_DECLARE_OBJECT_INFO ("ir.StructInfo", StructInfoNode, Object)
 

Static Public Member Functions

static void RegisterReflection ()
 
- Static Public Member Functions inherited from tvm::relax::StructInfoNode
static void RegisterReflection ()
 

Public Attributes

ffi::Optional< Exprshape
 optionally store the shape expression of the tensor. More...
 
ffi::Optional< VDevicevdevice
 The virtual device, indicates where the tensor is expected to be executed. More...
 
DataType dtype
 The content data type, use void to denote the dtype is unknown. More...
 
int ndim
 The number of dimension of the tensor, can be unknown. More...
 
- Public Attributes inherited from tvm::relax::StructInfoNode
Span span
 Span that points to the original source code. Reserved debug information. More...
 

Additional Inherited Members

- Static Public Attributes inherited from tvm::relax::StructInfoNode
static constexpr TVMFFISEqHashKind _type_s_eq_hash_kind = kTVMFFISEqHashKindTreeNode
 
static constexpr const uint32_t _type_child_slots = 7
 

Detailed Description

StructInfo of Tensor.

Member Function Documentation

◆ GetShape()

ffi::Optional<ffi::Array<PrimExpr> > tvm::relax::TensorStructInfoNode::GetShape ( ) const
inline
Returns
Shape if it is known.

◆ IsUnknownDtype()

bool tvm::relax::TensorStructInfoNode::IsUnknownDtype ( ) const
inline
Returns
Whether the struct info contains unknown dtype.

◆ IsUnknownNdim()

bool tvm::relax::TensorStructInfoNode::IsUnknownNdim ( ) const
inline
Returns
Whether the struct info contains unknown ndim.

◆ RegisterReflection()

static void tvm::relax::TensorStructInfoNode::RegisterReflection ( )
inlinestatic

◆ TVM_FFI_DECLARE_OBJECT_INFO_FINAL()

tvm::relax::TensorStructInfoNode::TVM_FFI_DECLARE_OBJECT_INFO_FINAL ( "relax.TensorStructInfo"  ,
TensorStructInfoNode  ,
StructInfoNode   
)

Member Data Documentation

◆ dtype

DataType tvm::relax::TensorStructInfoNode::dtype

The content data type, use void to denote the dtype is unknown.

◆ ndim

int tvm::relax::TensorStructInfoNode::ndim

The number of dimension of the tensor, can be unknown.

See also
kUnknownNDim

◆ shape

ffi::Optional<Expr> tvm::relax::TensorStructInfoNode::shape

optionally store the shape expression of the tensor.

Note
shape must be normalized: it can only be std::nullopt or ShapeExpr or Var.

◆ vdevice

ffi::Optional<VDevice> tvm::relax::TensorStructInfoNode::vdevice

The virtual device, indicates where the tensor is expected to be executed.


The documentation for this class was generated from the following file: