Expand description
Expressions: variables, constants, calls, tuples and tensor accesses.
The objects python/tvm_tirx/ir/expr.py defines. Expr is the base of every expression and
carries its type and location. The primitive arithmetic and vector expressions are in
prim. The constructors are new, or from_dtype and the like where new
allocates the fields as given; they are written in Rust after the C++ constructors, with their
checks, defaults and errors. The constants of the common types are IntImm::int32,
IntImm::int64, IntImm::bool, FloatImm::float32 and FloatImm::float64, and an
i32, i64, bool, f32 or f64 converts into an Expr as C++ converts it implicitly.
Structs§
- Complete: reflected fields fill [40, 72) exactly.
- Complete: reflected fields fill [40, 40) exactly.
- Complete: reflected fields fill [40, 48) exactly (alignment padding [44, 48)).
- Complete: reflected fields fill [24, 40) exactly.
- Complete: reflected fields fill [40, 48) exactly.
- Complete: reflected fields fill [40, 56) exactly.
- Complete: reflected fields fill [40, 56) exactly.
- A
PrimExprof a scalar signed or unsigned integer type of any width (C++IntExpr), such as an index or an extent. - Complete: reflected fields fill [40, 56) exactly.
- Complete: reflected fields fill [40, 56) exactly.
- Complete: reflected fields fill [40, 40) exactly.
- An expression typed by a
PrimType(C++PrimExpr): a constant, a variable, an operator on scalars or vectors, or a call that returns one. - Complete: reflected fields fill [24, 48) exactly.
- Complete: reflected fields fill [40, 40) exactly.
- Complete: reflected fields fill [40, 56) exactly.
- Complete: reflected fields fill [40, 56) exactly.
- Complete: reflected fields fill [40, 56) exactly.
- Complete: reflected fields fill [40, 56) exactly (alignment padding [52, 56)).
- Complete: reflected fields fill [40, 48) exactly.
- Complete: reflected fields fill [40, 56) exactly.
Enums§
- One index of
Expr::subscript: an expression, or astart:stop:stepslice whose missing bounds areNone.
Traits§
- What converts to an expression, possibly failing: anything that converts into an
Expr(a node, aVar, a Rusti32,f32and the like), and anExprResult, an expression under construction, which gives the first error any of its steps raised. The constructors and functions that can fail take their expression operands asimpl IntoExpr, so anExprResultpasses straight in and?on their result covers it.