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

Base node of all primitive expressions. More...

#include <expr.h>

Inheritance diagram for tvm::PrimExprNode:
Collaboration diagram for tvm::PrimExprNode:

Public Member Functions

 TVM_OBJECT_ENABLE_SCRIPT_PRINTER ()
 
 TVM_DECLARE_BASE_OBJECT_INFO (PrimExprNode, BaseExprNode)
 
- Public Member Functions inherited from tvm::BaseExprNode
 TVM_DECLARE_BASE_OBJECT_INFO (BaseExprNode, Object)
 

Static Public Member Functions

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

Public Attributes

DataType dtype
 The runtime data type of the primitive expression. More...
 
- Public Attributes inherited from tvm::BaseExprNode
Span span
 Span that points to the original source code. Reserved debug information. More...
 

Static Public Attributes

static constexpr const char * _type_key = "ir.PrimExpr"
 
static constexpr const uint32_t _type_child_slots = 40
 
- Static Public Attributes inherited from tvm::BaseExprNode
static constexpr const char * _type_key = "ir.BaseExpr"
 
static constexpr TVMFFISEqHashKind _type_s_eq_hash_kind = kTVMFFISEqHashKindTreeNode
 
static constexpr const uint32_t _type_child_slots = 64
 

Detailed Description

Base node of all primitive expressions.

A primitive expression deals with low-level POD data types and handles without doing life-cycle management for objects.

PrimExpr is used in the low-level code optimizations and integer analysis.

See also
PrimExpr

Member Function Documentation

◆ RegisterReflection()

static void tvm::PrimExprNode::RegisterReflection ( )
inlinestatic

◆ TVM_DECLARE_BASE_OBJECT_INFO()

tvm::PrimExprNode::TVM_DECLARE_BASE_OBJECT_INFO ( PrimExprNode  ,
BaseExprNode   
)

◆ TVM_OBJECT_ENABLE_SCRIPT_PRINTER()

tvm::PrimExprNode::TVM_OBJECT_ENABLE_SCRIPT_PRINTER ( )

Member Data Documentation

◆ _type_child_slots

constexpr const uint32_t tvm::PrimExprNode::_type_child_slots = 40
staticconstexpr

◆ _type_key

constexpr const char* tvm::PrimExprNode::_type_key = "ir.PrimExpr"
staticconstexpr

◆ dtype

DataType tvm::PrimExprNode::dtype

The runtime data type of the primitive expression.

runtime::DataType(dtype) provides coarse grained type information during compile time and runtime. It is eagerly built in PrimExpr expression construction and can be used for quick type checking.

dtype is sufficient to decide the Type of the PrimExpr when it corresponds to POD value types such as i32.

When dtype is DataType::Handle(), the expression could corresponds to a more fine-grained Type, and we can get the type by running lazy type inference.


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