tvm
|
Base node of all primitive expressions. More...
#include <expr.h>
Public Member Functions | |
TVM_OBJECT_ENABLE_SCRIPT_PRINTER () | |
TVM_DECLARE_BASE_OBJECT_INFO (PrimExprNode, BaseExprNode) | |
![]() | |
TVM_DECLARE_BASE_OBJECT_INFO (BaseExprNode, Object) | |
Static Public Member Functions | |
static void | RegisterReflection () |
![]() | |
static void | RegisterReflection () |
Public Attributes | |
DataType | dtype |
The runtime data type of the primitive expression. More... | |
![]() | |
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 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 |
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.
|
inlinestatic |
tvm::PrimExprNode::TVM_DECLARE_BASE_OBJECT_INFO | ( | PrimExprNode | , |
BaseExprNode | |||
) |
tvm::PrimExprNode::TVM_OBJECT_ENABLE_SCRIPT_PRINTER | ( | ) |
|
staticconstexpr |
|
staticconstexpr |
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.