heterocl.tvm.expr module¶
Expression AST Node in TVM.
User do not need to deal with expression AST node directly. But they can be helpful for developer to do quick proptyping. While not displayed in the document and python file. Each expression node have subfields that can be visited from python side.
For example, you can use addexp.a to get the left operand of an Add node.
x = tvm.var("n")
y = x + 2
assert(isinstance(y, tvm.expr.Add))
assert(y.a == x)
-
class
BinaryOpExpr
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
class
Broadcast
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
class
Call
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
Extern
= 0¶
-
ExternCPlusPlus
= 1¶
-
Halide
= 3¶
-
Intrinsic
= 4¶
-
PureExtern
= 2¶
-
PureIntrinsic
= 5¶
-
-
class
Cast
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
class
CmpExpr
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
class
ConstExpr
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
class
EQ
(handle)[source]¶ Bases:
heterocl.tvm.expr.CmpExpr
-
class
EqualOp
(a, b)[source]¶ Bases:
heterocl.tvm._ffi.node_generic.NodeGeneric
,heterocl.tvm.expr.ExprOp
Deferred equal operator.
This is used to support sugar that a == b can either mean NodeBase.same_as or NodeBase.equal.
-
same_as
¶ Return self==value.
-
-
class
Expr
(handle)[source]¶ Bases:
heterocl.tvm.expr.ExprOp
,heterocl.tvm._ffi.node.NodeBase
Base class of all tvm Expressions
-
class
FloatImm
(handle)[source]¶ Bases:
heterocl.tvm.expr.ConstExpr
-
class
GE
(handle)[source]¶ Bases:
heterocl.tvm.expr.CmpExpr
-
class
GT
(handle)[source]¶ Bases:
heterocl.tvm.expr.CmpExpr
-
class
GetBit
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
class
GetSlice
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
class
IntImm
(handle)[source]¶ Bases:
heterocl.tvm.expr.ConstExpr
-
class
KernelExpr
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
class
LE
(handle)[source]¶ Bases:
heterocl.tvm.expr.CmpExpr
-
class
LT
(handle)[source]¶ Bases:
heterocl.tvm.expr.CmpExpr
-
class
Let
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
class
Load
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
class
LogicalExpr
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
class
NE
(handle)[source]¶ Bases:
heterocl.tvm.expr.CmpExpr
-
class
NotEqualOp
(a, b)[source]¶ Bases:
heterocl.tvm._ffi.node_generic.NodeGeneric
,heterocl.tvm.expr.ExprOp
Deferred NE operator.
This is used to support sugar that a != b can either mean not NodeBase.same_as or make.NE.
-
same_as
¶ Return self==value.
-
-
class
Quantize
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
class
Ramp
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
class
Reduce
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
class
Select
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
class
SetBit
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
class
SetSlice
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
class
Shuffle
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
class
StreamExpr
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
-
DoubleBuffer
= 1¶
-
FIFO
= 0¶
-
-
class
StringImm
(handle)[source]¶ Bases:
heterocl.tvm.expr.ConstExpr
-
class
UIntImm
(handle)[source]¶ Bases:
heterocl.tvm.expr.ConstExpr
-
class
Var
(handle)[source]¶ Bases:
heterocl.tvm.expr.Expr
Symbolic variable.