19#ifndef TVM_SCRIPT_IR_BUILDER_IR_H_
20#define TVM_SCRIPT_IR_BUILDER_IR_H_
22#include <tvm/ffi/container/tuple.h>
23#include <tvm/ffi/container/variant.h>
70 ffi::Optional<PrimExpr> step = std::nullopt,
71 ffi::Optional<PrimType> dtype = std::nullopt,
72 ffi::Optional<ffi::Map<ffi::String, Any>> annotations = std::nullopt);
82 ffi::Optional<PrimType> dtype = std::nullopt);
92 ffi::Array<ffi::String> message_parts);
106Var Bind(
Expr value, ffi::Optional<Type> type_annotation = std::nullopt,
107 ffi::Optional<Var> var = std::nullopt);
162 ffi::Optional<ffi::Array<Var>> body_params = std::nullopt,
Managed reference to BaseFuncNode.
Definition function.h:181
Managed reference to BindNode.
Definition stmt.h:159
Managed reference to DictAttrsNode.
Definition attrs.h:108
Managed reference to EvaluateNode.
Definition stmt.h:372
Managed reference to ExprNode.
Definition base_expr.h:359
Managed reference to ForNode.
Definition stmt.h:511
Managed reference to GlobalVarNode.
Definition expr.h:853
Managed reference to IfNode.
Definition stmt.h:415
Reference-counted handle to a canonical named operator.
Definition op.h:147
Typed reference/view over any Expr whose ExprNode::ty is PrimType.
Definition base_expr.h:447
Managed reference to ReturnNode.
Definition stmt.h:592
Container of all statements.
Definition stmt.h:62
Managed reference to VarNode.
Definition expr.h:714
Managed reference to WhileNode.
Definition stmt.h:558
Managed reference to AssertFrameObj.
Definition frame.h:204
Managed reference to ElseFrameObj.
Definition frame.h:417
Managed reference to ForFrameObj.
Definition frame.h:152
Managed reference to IfFrameObj.
Definition frame.h:339
Managed reference to RegionFrameObj.
Definition frame.h:247
Managed reference to ThenFrameObj.
Definition frame.h:378
Managed reference to WhileFrameObj.
Definition frame.h:290
TVM_TIRX_DLL IRModuleFrame IRModule()
The IRModule declaration statement.
Definition module.h:248
TVM_TIRX_DLL GlobalVar DeclFunction(const ffi::String &func_name, const BaseFunc &func_signature)
Declare a Function without given the specific function implementation.
ThenFrame Then()
Create a then.
TVM_TIRX_DLL void DefFunction(const ffi::String &func_name, const BaseFunc &func)
Define the function which is declared before.
ElseFrame Else()
Create an else.
ForFrame Grid(ffi::Array< ffi::Variant< PrimExpr, ffi::Tuple< PrimExpr, PrimExpr > > > extents, ffi::Optional< PrimType > dtype=std::nullopt)
The grid For statement.
tvm::Stmt Continue()
Create a continue statement.
AssertFrame Assert(PrimExpr condition, ffi::String error_kind, ffi::Array< ffi::String > message_parts)
The assertion statement.
RegionFrame Region(Op op, ffi::Array< Expr > args, ffi::Optional< ffi::Array< Var > > body_params=std::nullopt, DictAttrs attrs=DictAttrs())
Construct a result-free region with lexical body parameters.
tvm::Stmt Break()
Create a break statement.
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition attr.h:23
ForKind
The kind of the loop.
Definition stmt.h:433
#define TVM_TIRX_DLL
Definition base.h:83