Package-level declarations

Types

Link copied to clipboard

Constant folding optimization pass

Link copied to clipboard

Policy governing how a constant tensor (a weight, a bias, a frozen parameter) is materialized into the emitted StableHLO text.

Link copied to clipboard
class ConversionContext @JvmOverloads constructor(typeMapper: TypeMapper, graph: ComputeGraph? = null, val materializationPolicy: ConstantMaterializationPolicy = ConstantMaterializationPolicy.InlineAlways)

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
data class ExternalParameterRef(val scope: String, val key: String, val encoding: TensorEncoding, val source: BufferHandle)

Reference to a weight tensor that has been lifted out of the emitted StableHLO text and moved behind an util.global.load reference. The converter produces these; a downstream packager consumes them to write an IREE parameter archive (.irpa).

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 @JvmOverloads constructor(registry: StableHloOperationRegistry, typeMapper: TypeMapper, validator: MlirValidator? = null, materializationPolicy: ConstantMaterializationPolicy = ConstantMaterializationPolicy.InlineAlways)

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(), val externalParameters: List<ExternalParameterRef> = emptyList())

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.