ReductionOperationsConverter

Converter for reduction operations.

This converter handles reduction operations using StableHLO primitives:

  • sum: using stablehlo.custom_call @reduce_sum with dimension attributes

  • mean: using reduce_sum + divide by element count

  • variance: using stablehlo.custom_call @reduce_variance

Uses custom_call for reduction operations that require region bodies, consistent with the approach used by NeuralNetOperationsConverter for layerNorm.

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