@@ -49,11 +49,11 @@ module {
4949 }
5050}
5151
52- // CHECK-DAG : [[MAP_0_ :#.+]] = affine_map<(d0, d1) -> (d0, d1)>
52+ // CHECK: [[MAP_ :#.+]] = affine_map<(d0, d1) -> (d0, d1)>
5353// CHECK-LABEL: func.func @kernel
5454// CHECK-SAME: ([[PARAM_0_:%.+]]: memref<*xbf16>, [[PARAM_1_:%.+]]: memref<*xbf16>, [[PARAM_2_:%.+]]: memref<*xbf16>, [[PARAM_3_:%.+]]: i32, [[PARAM_4_:%.+]]: i32, [[PARAM_5_:%.+]]: i32, [[PARAM_6_:%.+]]: i32, [[PARAM_7_:%.+]]: i32, [[PARAM_8_:%.+]]: i32) {
55- // CHECK-DAG: [[CST_0_dot_000000_:%.+]] = arith.constant 0.000000e+00 : bf16
5655// CHECK-NOT: separator of consecutive DAGs
56+ // CHECK: [[CST_0_:%.+]] = arith.constant 0.000000e+00 : bf16
5757// CHECK-DAG: [[VAR_reinterpret_cast_:%.+]] = memref.reinterpret_cast [[PARAM_0_]] to offset: [0], sizes: [128, 64], strides: [128, 1] : memref<*xbf16> to memref<128x64xbf16, strided<[128, 1]>>
5858// CHECK-DAG: [[RES_:%.+]] = memref.alloc() : memref<128x64xbf16>
5959// CHECK: memref.copy [[VAR_reinterpret_cast_]], [[RES_]] : memref<128x64xbf16, strided<[128, 1]>> to memref<128x64xbf16>
@@ -68,14 +68,14 @@ module {
6868// CHECK-DAG: [[VAR_reinterpret_cast_2_:%.+]] = memref.reinterpret_cast [[PARAM_2_]] to offset: [0], sizes: [128, 256], strides: [256, 1] : memref<*xbf16> to memref<128x256xbf16, strided<[256, 1]>>
6969// CHECK-DAG: [[RES_2_:%.+]] = memref.alloc() : memref<128x256xbf16>
7070// CHECK: memref.copy [[VAR_reinterpret_cast_2_]], [[RES_2_]] : memref<128x256xbf16, strided<[256, 1]>> to memref<128x256xbf16>
71- // CHECK-DAG: [[VAR_3_:%.+]] = bufferization.to_tensor [[RES_2_]] restrict writable : memref<128x256xbf16>
72- // CHECK-DAG: [[VAR_4_:%.+]] = tensor.empty() : tensor<128x256xbf16>
73- // CHECK: [[VAR_5_:%.+]] = linalg.fill ins([[CST_0_dot_000000_ ]] : bf16) outs([[VAR_4_]] : tensor<128x256xbf16>) -> tensor<128x256xbf16>
71+ // CHECK: [[VAR_3_:%.+]] = bufferization.to_tensor [[RES_2_]] restrict writable : memref<128x256xbf16>
72+ // CHECK: [[VAR_4_:%.+]] = tensor.empty() : tensor<128x256xbf16>
73+ // CHECK: [[VAR_5_:%.+]] = linalg.fill ins([[CST_0_ ]] : bf16) outs([[VAR_4_]] : tensor<128x256xbf16>) -> tensor<128x256xbf16>
7474// CHECK: [[VAR_6_:%.+]] = linalg.matmul ins([[VAR_0_]], [[VAR_transposed_]] : tensor<128x64xbf16>, tensor<64x256xbf16>) outs([[VAR_5_]] : tensor<128x256xbf16>) -> tensor<128x256xbf16>
75- // CHECK: [[VAR_7_:%.+]] = linalg.generic {indexing_maps = [#map, #map, #map ], iterator_types = ["parallel", "parallel"]} ins([[VAR_3_]], [[VAR_6_]] : tensor<128x256xbf16>, tensor<128x256xbf16>) outs([[VAR_3_]] : tensor<128x256xbf16>) {
76- // CHECK: ^bb0([[IN_0_ :%.+]]: bf16, [[IN_1_ :%.+]]: bf16, [[IN_2_: %.+]] : bf16):
77- // CHECK: [[VAR_8_:%.+]] = arith.addf [[IN_0_ ]], [[IN_1_ ]] : bf16
78- // CHECK: linalg.yield [[VAR_8_]] : bf16
75+ // CHECK: [[VAR_7_:%.+]] = linalg.generic {indexing_maps = [[[MAP_]], [[MAP_]], [[MAP_]] ], iterator_types = ["parallel", "parallel"]} ins([[VAR_3_]], [[VAR_6_]] : tensor<128x256xbf16>, tensor<128x256xbf16>) outs([[VAR_3_]] : tensor<128x256xbf16>) {
76+ // CHECK: ^bb0([[VAR_in_1 :%.+]]: bf16, [[VAR_in_2 :%.+]]: bf16, {{ %.+}} : bf16):
77+ // CHECK: [[VAR_8_:%.+]] = arith.addf [[VAR_in_1 ]], [[VAR_in_2 ]] : bf16
78+ // CHECK: linalg.yield [[VAR_8_:%.+ ]] : bf16
7979// CHECK: } -> tensor<128x256xbf16>
8080// CHECK: bufferization.materialize_in_destination [[VAR_7_]] in writable [[VAR_reinterpret_cast_2_]] : (tensor<128x256xbf16>, memref<128x256xbf16, strided<[256, 1]>>) -> ()
8181// CHECK: return
0 commit comments