tvm_tirx.ir.transform.Pass

Contents

tvm_tirx.ir.transform.Pass#

class tvm_tirx.ir.transform.Pass(*args, **kwargs)#

Bases: Object

Base interface for callable IRModule transformations and analyses.

Obtain a concrete pass from a pass factory, module_pass(), or tvm_tirx.tirx.transform.function_pass(), then call after = pass_object(before): a pass takes an IRModule and returns the transformed IRModule. The call runs under the current PassContext, whose instruments observe it. A direct call always runs the pass; the optimization level and the required_pass/disabled_pass options apply when a Sequential runs it. The info property exposes its name and optimization level. The base class defines no transformation of its own.

Examples

from tvm_tirx import tirx

simplify = tirx.transform.StmtSimplify()
after = simplify(mod)
print(simplify.info.name)  # tirx.StmtSimplify
Parameters:
  • args (Any)

  • kwargs (Any)

property info#

Get the pass meta.