MlirTestUtilities

Test utilities for verifying generated MLIR correctness.

This class provides comprehensive testing utilities for validating StableHLO MLIR generation, including syntax validation, semantic checks, and round-trip validation.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Create a complex test graph with multiple operation types

Link copied to clipboard

Create a simple test graph for validation testing

Link copied to clipboard

Extract performance metrics from module generation

Link copied to clipboard
fun validateMlirPatterns(module: StableHloModule, expectedPatterns: List<String>): List<String>

Validate that generated MLIR matches expected patterns

Link copied to clipboard

Perform comprehensive correctness verification of a StableHLO module

Link copied to clipboard
fun verifyOperations(module: StableHloModule, expectedOperations: List<String>): List<String>

Verify that a module contains expected operations

Link copied to clipboard

Verify that a module has correct SSA form

Link copied to clipboard

Verify that a module has correct type annotations