module { func.func @main(%x: tensor<2x7xf32>, %target: tensor<2x7xf32>) -> (tensor<2x7xf32>, tensor<2x7xf32>) { %v0 = stablehlo.constant dense<0.00000000000000000e+00> : tensor<2x7xf32> %v1 = stablehlo.constant dense<-3.40282346000000007e+38> : tensor %v2 = stablehlo.reduce(%x init: %v1) applies stablehlo.maximum across dimensions = [1] : (tensor<2x7xf32>, tensor) -> tensor<2xf32> %v3 = stablehlo.broadcast_in_dim %v2, dims = [0] : (tensor<2xf32>) -> tensor<2x7xf32> %v4 = stablehlo.subtract %x, %v3 : tensor<2x7xf32> %v5 = stablehlo.exponential %v4 : tensor<2x7xf32> %v6 = stablehlo.constant dense<0.00000000000000000e+00> : tensor %v7 = stablehlo.reduce(%v5 init: %v6) applies stablehlo.add across dimensions = [1] : (tensor<2x7xf32>, tensor) -> tensor<2xf32> %v8 = stablehlo.broadcast_in_dim %v7, dims = [0] : (tensor<2xf32>) -> tensor<2x7xf32> %v9 = stablehlo.log %v8 : tensor<2x7xf32> %v10 = stablehlo.subtract %v4, %v9 : tensor<2x7xf32> %v11 = stablehlo.multiply %target, %v10 : tensor<2x7xf32> %v12 = stablehlo.reduce(%v11 init: %v6) applies stablehlo.add across dimensions = [1] : (tensor<2x7xf32>, tensor) -> tensor<2xf32> %v13 = stablehlo.broadcast_in_dim %v12, dims = [0] : (tensor<2xf32>) -> tensor<2x7xf32> %v14 = stablehlo.negate %v13 : tensor<2x7xf32> %v15 = stablehlo.exponential %v10 : tensor<2x7xf32> %v16 = stablehlo.subtract %v15, %target : tensor<2x7xf32> return %v14, %v16 : tensor<2x7xf32>, tensor<2x7xf32> } }