(self, dialect: Optional[str] = None)
| 563 | raise NotImplementedError("must override") |
| 564 | |
| 565 | def as_text(self, dialect: Optional[str] = None) -> str: |
| 566 | if dialect is None: |
| 567 | dialect = "stablehlo" |
| 568 | if dialect == "mhlo": |
| 569 | return str(self.mhlo()) |
| 570 | elif dialect == "stablehlo": |
| 571 | return str(self.stablehlo()) |
| 572 | elif dialect == "hlo": |
| 573 | return self.hlo().as_hlo_text() |
| 574 | else: |
| 575 | raise ValueError(f"unknown dialect: {dialect}") |
| 576 | |
| 577 | def compiler_ir(self, dialect: Optional[str] = None) -> Any: |
| 578 | if dialect is None: |