Class PrimExpr#

Inheritance Relationships#

Base Type#

Derived Types#

Class Documentation#

class PrimExpr : public tvm::TypedExpr<PrimType>#

Typed reference/view over any Expr whose ExprObj::ty is PrimType.

PrimExpr is a type category rather than a dedicated runtime node category. It can contain intrinsic primitive nodes such as IntImmObj and FloatImmObj, or a general ExprObj such as CallObj, when that expression’s ty field is a PrimType. This keeps primitive-only APIs explicit while allowing shared Expr nodes for cross-dialect values with richer result types when needed.

Subclassed by tvm::FloatImm, tvm::IntExpr, tvm::IntImm, tvm::PrimVar, tvm::TensorLoad, tvm::prim::Add, tvm::prim::And, tvm::prim::BitwiseAnd, tvm::prim::BitwiseNot, tvm::prim::BitwiseOr, tvm::prim::BitwiseXor, tvm::prim::Broadcast, tvm::prim::Cast, tvm::prim::Div, tvm::prim::EQ, tvm::prim::FloorDiv, tvm::prim::FloorMod, tvm::prim::GE, tvm::prim::GT, tvm::prim::LE, tvm::prim::LShift, tvm::prim::LT, tvm::prim::Let, tvm::prim::Max, tvm::prim::Min, tvm::prim::Mod, tvm::prim::Mul, tvm::prim::NE, tvm::prim::Not, tvm::prim::Or, tvm::prim::RShift, tvm::prim::Ramp, tvm::prim::Select, tvm::prim::Shuffle, tvm::prim::Sub, tvm::sym::IterMapExpr

Public Types

using ContainerType = ExprObj#

Public Functions

PrimExpr(int32_t value)#

construct from integer.

Parameters:

value – The value to be constructed.

PrimExpr(float value)#

construct from float.

Parameters:

value – The value to be constructed.

inline explicit PrimExpr(ffi::ObjectPtr<ExprObj> node)#
inline explicit PrimExpr(::tvm::ffi::UnsafeInit tag)#
inline __PtrType operator->() const#
inline __PtrType get() const#