module { func.func @main(%x: tensor<2x7xf32>, %target: tensor<2x7xf32>, %tau: tensor<2x7xf32>) -> (tensor<2x7xf32>, tensor<2x7xf32>) { %v0 = stablehlo.constant dense<0.00000000000000000e+00> : tensor<2x7xf32> %v1 = stablehlo.subtract %target, %x : tensor<2x7xf32> %v2 = stablehlo.multiply %tau, %v1 : tensor<2x7xf32> %v3 = stablehlo.constant dense<1.00000000000000000e+00> : tensor<2x7xf32> %v4 = stablehlo.subtract %tau, %v3 : tensor<2x7xf32> %v5 = stablehlo.multiply %v4, %v1 : tensor<2x7xf32> %v6 = stablehlo.maximum %v2, %v5 : tensor<2x7xf32> %v7 = stablehlo.compare GT, %v1, %v0, FLOAT : (tensor<2x7xf32>, tensor<2x7xf32>) -> tensor<2x7xi1> %v8 = stablehlo.negate %tau : tensor<2x7xf32> %v9 = stablehlo.compare LT, %v1, %v0, FLOAT : (tensor<2x7xf32>, tensor<2x7xf32>) -> tensor<2x7xi1> %v10 = stablehlo.subtract %v3, %tau : tensor<2x7xf32> %v11 = stablehlo.select %v9, %v10, %v0 : tensor<2x7xi1>, tensor<2x7xf32> %v12 = stablehlo.select %v7, %v8, %v11 : tensor<2x7xi1>, tensor<2x7xf32> return %v6, %v12 : tensor<2x7xf32>, tensor<2x7xf32> } }