ShapeOperationsConverter

Converter for shape manipulation operations.

This converter implements shape operations using StableHLO primitives:

  • reshape: using stablehlo.reshape with proper shape inference

  • flatten: using stablehlo.reshape to flatten specified dimensions

  • squeeze: using stablehlo.reshape to remove singleton dimensions

  • unsqueeze: using stablehlo.broadcast_in_dim for dimension expansion

Supports operations as specified in Requirements 2.5:

  • Shape operations (reshape, flatten, squeeze, unsqueeze)

  • Dynamic reshaping with runtime shape computation

  • Proper shape inference and validation

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val supportedOperations: Set<String>

Set of operation names this converter supports

Functions

Link copied to clipboard
open override fun convert(node: GraphNode, operands: List<String>, context: ConversionContext): ConversionResult

Convert a graph node to StableHLO operations