Package-level declarations

Types

Link copied to clipboard

Constant folding optimization pass

Link copied to clipboard
class ConversionContext(typeMapper: TypeMapper, graph: ComputeGraph? = null)

Context object for maintaining state during StableHLO conversion.

Link copied to clipboard
sealed class ConversionResult

Result of an operation conversion

Link copied to clipboard

Dead code elimination pass

Link copied to clipboard

Validator for MLIR syntax and semantic correctness.

Link copied to clipboard

Operation fusion optimization pass

Link copied to clipboard

Interface for optimization passes

Link copied to clipboard
data class RegistryStats(val converterCount: Int, val operationCount: Int)

Statistics about the operation registry

Link copied to clipboard
class StableHloConverter(registry: StableHloOperationRegistry, typeMapper: TypeMapper, validator: MlirValidator? = null)

Main converter class that orchestrates the conversion process from ComputeGraph to StableHLO MLIR.

Link copied to clipboard

Factory for creating StableHLO converters with default configurations.

Link copied to clipboard
data class StableHloModule(val content: String, val functionName: String = "main", val inputSpecs: List<TensorSpec> = emptyList(), val outputSpecs: List<TensorSpec> = emptyList(), val metadata: Map<String, Any> = emptyMap())

Represents a StableHLO MLIR module text output

Link copied to clipboard

Interface for converting specific operations to StableHLO format.

Link copied to clipboard

Registry for StableHLO operation converters.

Link copied to clipboard

Optimizer for StableHLO MLIR modules.

Link copied to clipboard

Handles type system mapping between SKaiNET and MLIR types.

Functions

Link copied to clipboard

Returns an InputStream over the MLIR content encoded as UTF-8.

Link copied to clipboard

Returns a Reader over the MLIR content.

Link copied to clipboard
fun toStableHlo(graph: ComputeGraph, functionName: String = "main"): StableHloModule

Export a ComputeGraph into a minimal StableHLO MLIR module text.

Link copied to clipboard
fun toStableHloLegacy(graph: ComputeGraph, functionName: String = "main"): StableHloModule

Legacy implementation for backward compatibility.