19#ifndef TVM_RELAX_SCRIPT_BUILDER_IR_H_
20#define TVM_RELAX_SCRIPT_BUILDER_IR_H_
103 const ffi::Optional<tvm::Type>&
annotate_ty = std::nullopt);
Managed reference to ExprNode.
Definition base_expr.h:335
Managed reference to TypeNode.
Definition base_expr.h:77
Managed reference to VarNode.
Definition expr.h:372
RAII wrapper function to enter and exit a context object similar to python's with syntax.
Definition with_context.h:59
Managed reference to ElseFrameNode.
Definition frame.h:319
Managed reference to IfFrameNode.
Definition frame.h:239
Managed reference to ThenFrameNode.
Definition frame.h:279
BindingBlockFrame BindingBlock()
Start a binding block frame.
tvm::Var Arg(const ffi::String &name, const tvm::Type &ty)
Add a parameter to the last function frame.
IfFrame If(tvm::relax::Expr condition)
Create an if statement.
ThenFrame Then()
Create a then.
ElseFrame Else()
Create an else.
FunctionFrame Function(bool is_pure, bool is_private)
Start a function frame.
BindingBlockFrame Dataflow()
Start a dataflow binding block frame.
void FuncRetType(const tvm::Type &ret_ty)
Specify the return type of the last function frame.
tvm::Var EmitMatchCast(const tvm::relax::Expr &value, const tvm::Type &ty)
Emit a match_cast binding to the last binding block frame.
void FuncName(const ffi::String &name)
Specify the name of the last function frame.
tvm::Var EmitVarBinding(const tvm::relax::VarBinding &binding)
Emit a binding to the last binding block frame.
void FuncAttrs(ffi::Map< ffi::String, Any > attrs)
Specify the attrs of the last function frame.
tvm::Var Emit(const tvm::relax::Expr &value, const ffi::Optional< tvm::Type > &annotate_ty=std::nullopt)
Emit a binding to the last binding block frame.
void FuncRetValue(const tvm::relax::Expr &value)
Specify the return value of the last function frame.
void DataflowBlockOutput(const ffi::Array< tvm::Var > &vars)
Expose the dataflow block output variables as global ones.
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition analyzer.h:40
Relax types, including the richer dependent Relax type nodes.