tvm.script.parser
tvm.script.parser
The parser subpackage of TVMScript.
Per-dialect parser submodules (tvm.script.parser.tirx, etc.) are
resolved lazily via tvm.script._DIALECT_REGISTRY. When a dialect
is accessed (e.g. tvm.script.parser.tirx), this subpackage’s
__getattr__ looks up the dialect in _DIALECT_REGISTRY and imports
<dialect_module_path>.parser (e.g. tvm.tirx.script.parser),
caching the result so subsequent accesses skip __getattr__.
The IR layer is foundational and is NOT registered as a dialect — its
parser lives as a real submodule tvm.script.parser.ir, with
ir_module re-exported at this level for convenience.
See tvm.script for a full description of the dialect resolution
mechanism, including the _DialectRedirectFinder that handles
deep statement-form imports.
- tvm.script.parser.parse(program: AST | Any | str, extra_vars: dict[str, Any] | None = None, check_well_formed: bool = True) Any
Register a method for a operand type, AST operator node and operand index.
tvm.script.parser.ir
The ir module parser
tvm.script.parser.relax
Initial impl of relax parser for sugars
tvm.script.parser.tirx
The tirx parser