ml_switcheroo.importers.stablehlo_reader¶
Importer for StableHLO Specification (OpenXLA).
This module parses the official StableHLO Markdown specifications (spec.md), extracting operator names, descriptions, and argument signatures into the Semantic Knowledge Base format.
It parses the specific structure of OpenXLA docs: - Headers: ### `op_name` (Backticked names). - Semantics: Text bodies following headers. - Syntax: #### Syntax blocks containing MLIR signatures.
Classes¶
Parses StableHLO Markdown specification files. |
Module Contents¶
- class ml_switcheroo.importers.stablehlo_reader.StableHloSpecImporter¶
Parses StableHLO Markdown specification files.
- parse_file(target_file: pathlib.Path) Dict[str, Any]¶
Parses spec.md from the StableHLO repository.
- Parameters:
target_file – Path to the markdown file.
- Returns:
Dictionary mapping Operator IDs (e.g. ‘Abs’) to ODL definitions.