ml_switcheroo.core.mlir.stablehlo_emitter¶

StableHLO Emitter Backend.

Translates Python CST to MLIR using the StableHLO dialect for math operations and the Func/Builtin dialects for structure. It relies on the SemanticsManager to map Python source APIs (like torch.abs) to StableHLO operations (like stablehlo.abs).

Classes¶

StableHloEmitter

Specialized Emitter that produces StableHLO, Func, and Builtin dialect operations.

Module Contents¶

class ml_switcheroo.core.mlir.stablehlo_emitter.StableHloEmitter(semantics: ml_switcheroo.semantics.manager.SemanticsManager)¶

Bases: ml_switcheroo.core.mlir.emitter.PythonToMlirEmitter

Specialized Emitter that produces StableHLO, Func, and Builtin dialect operations.

semantics¶