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