@@ -73,48 +73,48 @@ module {
7373// CHECK-NEXT: func.func @main(%arg0: tensor<100x3xf32>, %arg1: tensor<100xf32>) -> tensor<100x100x3xf32> {
7474// CHECK-NEXT: %cst = stablehlo.constant dense<1.000000e+00> : tensor<100x100xf32>
7575// CHECK-NEXT: %c = stablehlo.constant dense<1> : tensor<100x100xi64>
76- // CHECK-NEXT: %0 = stablehlo.slice %arg0 [0:100, 2:3 ] : (tensor<100x3xf32 >) -> tensor<100x1xf32 >
77- // CHECK-NEXT: %1 = stablehlo.broadcast_in_dim %0, dims = [0 , 2] : (tensor<100x1xf32 >) -> tensor<100x100x1x1xf32 >
78- // CHECK-NEXT: %2 = stablehlo.slice %arg0 [0:100, 0: 2] : (tensor<100x3xf32 >) -> tensor<100x2xf32 >
79- // CHECK-NEXT: %3 = stablehlo.broadcast_in_dim %2, dims = [1 , 0] : (tensor<100x2xf32 >) -> tensor<2x100x100x1x1xf32 >
80- // CHECK-NEXT: %4 = stablehlo.iota dim = 1 : tensor<100x100xi64 >
81- // CHECK-NEXT: %5 = stablehlo.add %c, %4 : tensor<100x100xi64>
82- // CHECK-NEXT: %6 = stablehlo.broadcast_in_dim %2, dims = [2, 0] : ( tensor<100x2xf32>) -> tensor<2x100x100x1x1xf32 >
83- // CHECK-NEXT: %7 = stablehlo.slice %6 [0:1, 0:100, 0:100, 0:1 , 0:1 ] : (tensor<2x100x100x1x1xf32 >) -> tensor<1x100x100x1x1xf32 >
84- // CHECK-NEXT: %8 = stablehlo.reshape %7 : (tensor<1x100x100x1x1xf32 >) -> tensor<100x100x1x1xf32 >
85- // CHECK-NEXT: %9 = stablehlo.slice %6 [1:2, 0:100, 0:100, 0:1, 0:1] : (tensor<2x100x100x1x1xf32 >) -> tensor<1x100x100x1x1xf32 >
86- // CHECK-NEXT: %10 = stablehlo.reshape %9 : (tensor<1x100x100x1x1xf32 >) -> tensor<100x100x1x1xf32 >
87- // CHECK-NEXT: %11 = stablehlo.concatenate %8, %10, dim = 0 : (tensor<100x100x1x1xf32>, tensor<100x100x1x1xf32> ) -> tensor<200x100x1x1xf32 >
88- // CHECK-NEXT: %12 = stablehlo.reshape %11 : (tensor<200x100x1x1xf32> ) -> tensor<2x100x100x1x1xf32 >
89- // CHECK-NEXT: %13 = stablehlo.subtract %3, % 12 : tensor<2x100x100x1x1xf32>
90- // CHECK-NEXT: %14 = stablehlo.slice %13 [0:1, 0:100, 0:100, 0:1, 0:1] : ( tensor<2x100x100x1x1xf32>) -> tensor<1x100x100x1x1xf32 >
91- // CHECK-NEXT: %15 = stablehlo.slice %13 [1:2 , 0:100, 0:100, 0:1, 0:1] : (tensor<2x100x100x1x1xf32>) -> tensor<1x100x100x1x1xf32>
92- // CHECK-NEXT: %16 = stablehlo.iota dim = 0 : tensor<100x100xi64 >
93- // CHECK-NEXT: %17 = stablehlo.add %c, % 16 : tensor<100x100xi64 >
94- // CHECK-NEXT: %18 = stablehlo.compare EQ, %5, %17 : ( tensor<100x100xi64>, tensor<100x100xi64>) -> tensor<100x100xi1 >
95- // CHECK-NEXT: %19 = stablehlo.broadcast_in_dim %0, dims = [1, 2] : ( tensor<100x1xf32>) -> tensor<100x100x1x1xf32 >
96- // CHECK-NEXT: %20 = stablehlo.subtract %1 , %19 : tensor<100x100x1x1xf32 >
97- // CHECK-NEXT: %21 = stablehlo.reshape %20 : (tensor<100x100x1x1xf32 >) -> tensor<100x100x1x1x1xf32 >
98- // CHECK-NEXT: %22 = stablehlo.transpose %13, dims = [1, 2, 3, 4, 0] : ( tensor<2x100x100x1x1xf32>) -> tensor<100x100x1x1x2xf32 >
99- // CHECK-NEXT: %23 = stablehlo.concatenate %22, %21, dim = 4 : (tensor<100x100x1x1x2xf32>, tensor<100x100x1x1x1xf32> ) -> tensor<100x100x1x1x3xf32 >
100- // CHECK-NEXT: %24 = stablehlo.multiply %20 , %20 : tensor<100x100x1x1xf32 >
101- // CHECK-NEXT: %25 = stablehlo.reshape %14 : (tensor<1x100x100x1x1xf32 >) -> tensor<100x100xf32 >
102- // CHECK-NEXT: %26 = stablehlo.multiply %25, %25 : tensor<100x100xf32 >
103- // CHECK-NEXT: %27 = stablehlo.reshape %15 : (tensor<1x100x100x1x1xf32> ) -> tensor<100x100xf32 >
104- // CHECK-NEXT: %28 = stablehlo.multiply %27 , %27 : tensor<100x100xf32 >
105- // CHECK-NEXT: %29 = stablehlo.add %26 , %28 : tensor<100x100xf32>
106- // CHECK-NEXT: %30 = stablehlo.reshape %24 : (tensor<100x100x1x1xf32 >) -> tensor<100x100xf32>
107- // CHECK-NEXT: %31 = stablehlo.add %29 , %30 : tensor<100x100xf32>
108- // CHECK-NEXT: %32 = stablehlo.divide %cst , %31 : tensor<100x100xf32>
109- // CHECK-NEXT: %33 = stablehlo.select %18, %25, %32 : tensor<100x100xi1>, tensor<100x100xf32>
110- // CHECK-NEXT: %34 = stablehlo.broadcast_in_dim %arg1, dims = [0] : (tensor<100xf32>) -> tensor<100x100xf32>
111- // CHECK-NEXT: %35 = stablehlo.broadcast_in_dim %arg1, dims = [1] : (tensor<100xf32>) -> tensor<100x100xf32>
112- // CHECK-NEXT: %36 = stablehlo.multiply %34 , %35 : tensor<100x100xf32>
113- // CHECK-NEXT: %37 = stablehlo.multiply %36 , %33 : tensor<100x100xf32>
76+ // CHECK-NEXT: %0 = stablehlo.broadcast_in_dim %arg1, dims = [0 ] : (tensor<100xf32 >) -> tensor<100x100xf32 >
77+ // CHECK-NEXT: %1 = stablehlo.slice %arg0 [0:100 , 2:3 ] : (tensor<100x3xf32 >) -> tensor<100x1xf32 >
78+ // CHECK-NEXT: %2 = stablehlo.broadcast_in_dim %1, dims = [0, 2] : (tensor<100x1xf32 >) -> tensor<100x100x1x1xf32 >
79+ // CHECK-NEXT: %3 = stablehlo.slice %arg0 [0:100 , 0:2 ] : (tensor<100x3xf32 >) -> tensor<100x2xf32 >
80+ // CHECK-NEXT: %4 = stablehlo.broadcast_in_dim %3, dims = [1, 0] : ( tensor<100x2xf32>) -> tensor<2x100x100x1x1xf32 >
81+ // CHECK-NEXT: %5 = stablehlo.iota dim = 1 : tensor<100x100xi64>
82+ // CHECK-NEXT: %6 = stablehlo.add %c, %5 : tensor<100x100xi64 >
83+ // CHECK-NEXT: %7 = stablehlo.broadcast_in_dim %3, dims = [2 , 0] : (tensor<100x2xf32 >) -> tensor<2x100x100x1x1xf32 >
84+ // CHECK-NEXT: %8 = stablehlo.slice %7 [0:1, 0:100, 0:100, 0:1, 0:1] : (tensor<2x100x100x1x1xf32 >) -> tensor<1x100x100x1x1xf32 >
85+ // CHECK-NEXT: %9 = stablehlo.reshape %8 : (tensor<1x100x100x1x1xf32 >) -> tensor<100x100x1x1xf32 >
86+ // CHECK-NEXT: %10 = stablehlo.slice %7 [1:2, 0:100, 0:100, 0:1, 0:1] : (tensor<2x100x100x1x1xf32 >) -> tensor<1x100x100x1x1xf32 >
87+ // CHECK-NEXT: %11 = stablehlo.reshape %10 : (tensor<1x100x100x1x1xf32> ) -> tensor<100x100x1x1xf32 >
88+ // CHECK-NEXT: %12 = stablehlo.concatenate %9, %11, dim = 0 : (tensor<100x100x1x1xf32>, tensor<100x100x1x1xf32> ) -> tensor<200x100x1x1xf32 >
89+ // CHECK-NEXT: %13 = stablehlo.reshape % 12 : (tensor<200x100x1x1xf32>) -> tensor<2x100x100x1x1xf32>
90+ // CHECK-NEXT: %14 = stablehlo.subtract %4, %13 : tensor<2x100x100x1x1xf32>
91+ // CHECK-NEXT: %15 = stablehlo.slice %14 [0:1 , 0:100, 0:100, 0:1, 0:1] : (tensor<2x100x100x1x1xf32>) -> tensor<1x100x100x1x1xf32>
92+ // CHECK-NEXT: %16 = stablehlo.slice %14 [1:2, 0:100, 0:100, 0:1, 0:1] : ( tensor<2x100x100x1x1xf32>) -> tensor<1x100x100x1x1xf32 >
93+ // CHECK-NEXT: %17 = stablehlo.reshape % 16 : ( tensor<1x100x100x1x1xf32>) -> tensor<100x100xf32 >
94+ // CHECK-NEXT: %18 = stablehlo.iota dim = 0 : tensor<100x100xi64>
95+ // CHECK-NEXT: %19 = stablehlo.add %c, %18 : tensor<100x100xi64 >
96+ // CHECK-NEXT: %20 = stablehlo.compare EQ, %6 , %19 : ( tensor<100x100xi64>, tensor<100x100xi64>) -> tensor<100x100xi1 >
97+ // CHECK-NEXT: %21 = stablehlo.broadcast_in_dim %1, dims = [1, 2] : (tensor<100x1xf32 >) -> tensor<100x100x1x1xf32 >
98+ // CHECK-NEXT: %22 = stablehlo.subtract % 2, %21 : tensor<100x100x1x1xf32 >
99+ // CHECK-NEXT: %23 = stablehlo.broadcast_in_dim %arg1, dims = [1] : (tensor<100xf32> ) -> tensor<100x100xf32 >
100+ // CHECK-NEXT: %24 = stablehlo.multiply %0 , %23 : tensor<100x100xf32 >
101+ // CHECK-NEXT: %25 = stablehlo.reshape %22 : (tensor<100x100x1x1xf32 >) -> tensor<100x100x1x1x1xf32 >
102+ // CHECK-NEXT: %26 = stablehlo.transpose %14, dims = [1, 2, 3, 4, 0] : ( tensor<2x100x100x1x1xf32>) -> tensor<100x100x1x1x2xf32 >
103+ // CHECK-NEXT: %27 = stablehlo.concatenate %26, %25, dim = 4 : (tensor<100x100x1x1x2xf32>, tensor<100x100x1x1x1xf32> ) -> tensor<100x100x1x1x3xf32 >
104+ // CHECK-NEXT: %28 = stablehlo.multiply %22 , %22 : tensor<100x100x1x1xf32 >
105+ // CHECK-NEXT: %29 = stablehlo.multiply %17 , %17 : tensor<100x100xf32>
106+ // CHECK-NEXT: %30 = stablehlo.reshape %15 : (tensor<1x100x100x1x1xf32 >) -> tensor<100x100xf32>
107+ // CHECK-NEXT: %31 = stablehlo.multiply %30 , %30 : tensor<100x100xf32>
108+ // CHECK-NEXT: %32 = stablehlo.add %31 , %29 : tensor<100x100xf32>
109+ // CHECK-NEXT: %33 = stablehlo.reshape %28 : ( tensor<100x100x1x1xf32>) -> tensor<100x100xf32>
110+ // CHECK-NEXT: %34 = stablehlo.add %32, %33 : tensor<100x100xf32>
111+ // CHECK-NEXT: %35 = stablehlo.divide %cst, %34 : tensor<100x100xf32>
112+ // CHECK-NEXT: %36 = stablehlo.select %20 , %30, % 35 : tensor<100x100xi1>, tensor<100x100xf32>
113+ // CHECK-NEXT: %37 = stablehlo.multiply %24 , %36 : tensor<100x100xf32>
114114// CHECK-NEXT: %38 = stablehlo.broadcast_in_dim %37, dims = [0, 1] : (tensor<100x100xf32>) -> tensor<100x100x1x1x2xf32>
115115// CHECK-NEXT: %39 = stablehlo.reshape %37 : (tensor<100x100xf32>) -> tensor<100x100x1x1x1xf32>
116116// CHECK-NEXT: %40 = stablehlo.concatenate %38, %39, dim = 4 : (tensor<100x100x1x1x2xf32>, tensor<100x100x1x1x1xf32>) -> tensor<100x100x1x1x3xf32>
117- // CHECK-NEXT: %41 = stablehlo.multiply %40, %23 : tensor<100x100x1x1x3xf32>
117+ // CHECK-NEXT: %41 = stablehlo.multiply %40, %27 : tensor<100x100x1x1x3xf32>
118118// CHECK-NEXT: %42 = stablehlo.reshape %41 : (tensor<100x100x1x1x3xf32>) -> tensor<100x100x3xf32>
119119// CHECK-NEXT: %43 = stablehlo.transpose %42, dims = [1, 0, 2] : (tensor<100x100x3xf32>) -> tensor<100x100x3xf32>
120120// CHECK-NEXT: return %43 : tensor<100x100x3xf32>
0 commit comments