tvm
Loading...
Searching...
No Matches
Classes | Functions
tvm::script::ir_builder::tirx Namespace Reference

Classes

class  FunctionFrame
 Managed reference to FunctionFrameObj. More...
 
class  FunctionFrameObj
 A frame that represents the Function containing TIR statements. More...
 

Functions

TVM_TIRX_DLL FunctionFrame Function (bool is_private=false, bool persistent=false, bool is_declaration=false)
 The primitive function statement.
 
TVM_TIRX_DLL Var Arg (ffi::String name, Var var)
 The Function variable arguments adding function.
 
TVM_TIRX_DLL TensorVar Arg (ffi::String name, TensorVar tensor)
 The Function tensor arguments adding function.
 
TVM_TIRX_DLL void FuncName (ffi::String name)
 The Function naming statement.
 
TVM_TIRX_DLL void FuncAttrs (ffi::Map< ffi::String, ffi::Any > attrs)
 The Function annotation statement.
 
TVM_TIRX_DLL Type FuncRet (Type ret_type)
 The Function return type statement.
 
TVM_TIRX_DLL tvm::Stmt TensorStore (Expr dest, ffi::Array< PrimExpr > indices, PrimExpr value)
 Store data in a tensor destination.
 
Var Handle (ffi::Optional< PrimType > dtype=std::nullopt, runtime::MemoryScope storage_scope={})
 Create a TIR var that represents a pointer.
 
Var TensorMap ()
 

Function Documentation

◆ Arg() [1/2]

TVM_TIRX_DLL TensorVar tvm::script::ir_builder::tirx::Arg ( ffi::String  name,
TensorVar  tensor 
)

The Function tensor arguments adding function.

Parameters
nameThe name of the tensor.
tensorThe tensor argument.
Returns
The tensor.

◆ Arg() [2/2]

TVM_TIRX_DLL Var tvm::script::ir_builder::tirx::Arg ( ffi::String  name,
Var  var 
)

The Function variable arguments adding function.

Parameters
nameThe name of the variable.
varThe variable argument.
Returns
The variable.

◆ FuncAttrs()

TVM_TIRX_DLL void tvm::script::ir_builder::tirx::FuncAttrs ( ffi::Map< ffi::String, ffi::Any >  attrs)

The Function annotation statement.

Parameters
attrsThe annotations of the Function.

◆ FuncName()

TVM_TIRX_DLL void tvm::script::ir_builder::tirx::FuncName ( ffi::String  name)

The Function naming statement.

Parameters
nameThe name of the Function.

◆ FuncRet()

TVM_TIRX_DLL Type tvm::script::ir_builder::tirx::FuncRet ( Type  ret_type)

The Function return type statement.

Parameters
ret_typeThe return type of the Function.
Returns
The return type.

◆ Function()

TVM_TIRX_DLL FunctionFrame tvm::script::ir_builder::tirx::Function ( bool  is_private = false,
bool  persistent = false,
bool  is_declaration = false 
)

The primitive function statement.

Returns
The FunctionFrame.

◆ Handle()

Var tvm::script::ir_builder::tirx::Handle ( ffi::Optional< PrimType >  dtype = std::nullopt,
runtime::MemoryScope  storage_scope = {} 
)
inline

Create a TIR var that represents a pointer.

Parameters
dtypeThe optional data type of the pointer. If omitted, construct an opaque handle.
storage_scopeThe storage scope of the pointer.
Returns
The pointer.

◆ TensorMap()

Var tvm::script::ir_builder::tirx::TensorMap ( )
inline

◆ TensorStore()

TVM_TIRX_DLL tvm::Stmt tvm::script::ir_builder::tirx::TensorStore ( Expr  dest,
ffi::Array< PrimExpr >  indices,
PrimExpr  value 
)

Store data in a tensor destination.

Parameters
destThe destination expression.
indicesThe indices location to be stored.
valueThe value to be stored.
Returns
The same statement that was added to the parent frame.