tvm
Public Member Functions | Static Public Member Functions | Public Attributes | Static 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
 
Optional< Array< PrimExpr > > GetShape () const
 
 TVM_DECLARE_FINAL_OBJECT_INFO (TensorStructInfoNode, StructInfoNode)
 
- Public Member Functions inherited from tvm::relax::StructInfoNode
 TVM_DECLARE_BASE_OBJECT_INFO (StructInfoNode, Object)
 

Static Public Member Functions

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

Public Attributes

Optional< Exprshape
 optionally store the shape expression of the tensor. More...
 
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...
 

Static Public Attributes

static constexpr const char * _type_key = "relax.TensorStructInfo"
 
- Static Public Attributes inherited from tvm::relax::StructInfoNode
static constexpr TVMFFISEqHashKind _type_s_eq_hash_kind = kTVMFFISEqHashKindTreeNode
 
static constexpr const char * _type_key = "ir.StructInfo"
 
static constexpr const uint32_t _type_child_slots = 7
 

Detailed Description

StructInfo of Tensor.

Member Function Documentation

◆ GetShape()

Optional<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_DECLARE_FINAL_OBJECT_INFO()

tvm::relax::TensorStructInfoNode::TVM_DECLARE_FINAL_OBJECT_INFO ( TensorStructInfoNode  ,
StructInfoNode   
)

Member Data Documentation

◆ _type_key

constexpr const char* tvm::relax::TensorStructInfoNode::_type_key = "relax.TensorStructInfo"
staticconstexpr

◆ 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

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

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: