ml_switcheroo.core.mlir.gen_statements¶

Statement Generation Mixin for MLIR->Python.

This module implements the transformation logic for structural MLIR operations (sw.module, sw.func, sw.setattr, sw.return) into Python LibCST statements. It operates as a mixin to be combined with expression generation logic in the main generator.

Classes¶

StatementGeneratorMixin

Mixin class for generating LibCST Statements from MLIR Operations.

Module Contents¶

class ml_switcheroo.core.mlir.gen_statements.StatementGeneratorMixin[source]¶

Bases: ml_switcheroo.core.mlir.gen_base.BaseGeneratorMixin

Mixin class for generating LibCST Statements from MLIR Operations.

ctx: ml_switcheroo.core.mlir.naming.NamingContext¶
usage_counts: collections.defaultdict¶
usage_consumers: dict¶