Skip to content

Commit b5b43cc

Browse files
committed
Add tests
1 parent e43098e commit b5b43cc

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module {
2+
func.func @matmul(%A: tensor<128x256xf32>,
3+
%B: tensor<256x128xf32>,
4+
%C: tensor<128x128xf32>) -> tensor<128x128xf32> {
5+
%cst = arith.constant 0.000000e+00 : f32
6+
%0 = linalg.matmul
7+
ins(%A, %B : tensor<128x256xf32>, tensor<256x128xf32>)
8+
outs(%C : tensor<128x128xf32>) -> tensor<128x128xf32>
9+
10+
%1 = linalg.generic {
11+
indexing_maps = [affine_map<(d0, d1) -> (d0, d1)>,
12+
affine_map<(d0, d1) -> (d0, d1)>],
13+
iterator_types = ["parallel", "parallel"]
14+
} ins(%0 : tensor<128x128xf32>) outs(%C : tensor<128x128xf32>) {
15+
^bb0(%in: f32, %out: f32):
16+
%2 = arith.maxnumf %in, %cst : f32
17+
linalg.yield %2 : f32
18+
} -> tensor<128x128xf32>
19+
return %1 : tensor<128x128xf32>
20+
}
21+
}

0 commit comments

Comments
 (0)