tvm_tirx.tirx.script.region

Contents

tvm_tirx.tirx.script.region#

tvm_tirx.tirx.script.region(op, args, body_params=None, attrs=None)#

Construct a result-free region with operation-defined body parameters.

When body_params is omitted, the operation’s FRegionGetBodyParams hook creates fresh typed variables. Every region operation must register the hook, returning an empty array for no body parameters. Missing hooks reject construction even with explicit parameters. Explicit parameters must match the hook’s count and types and retain their identities.

Operands and attributes belong to the enclosing scope. Entering the frame returns one parameter directly, or a sequence for zero or multiple parameters. Result variables are supported by direct tvm_tirx.ir.RegionStmt construction; outward-result script syntax is not supported.

Parameters:
  • op (Op | str)

  • args (Sequence[Expr])

  • body_params (Sequence[Var] | None)

  • attrs (DictAttrs | dict[str, Any] | None)

Return type:

RegionFrame