Skip to content

Commit 4e629e5

Browse files
author
Longsheng Du
committed
update test
1 parent f423068 commit 4e629e5

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

test/gc-dialects/OneDNNGraph/onednn-graph-mlp.mlir

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22

33
// CHECK-LABEL: @mlp
44
func.func @mlp(%in: tensor<128x512xbf16>,
5-
%weight0: tensor<512x256xbf16>, %bias0: tensor<256xbf16>) -> tensor<128x256xbf16> {
5+
%weight0: tensor<512x64xbf16>, %bias0: tensor<64xbf16>,
6+
%weight1: tensor<64x256xbf16>, %bias1: tensor<256xbf16>) -> tensor<128x256xbf16> {
67
%0 = onednn_graph.matmul %in, %weight0, %bias0
7-
: (tensor<128x512xbf16>, tensor<512x256xbf16>, tensor<256xbf16>) -> tensor<128x256xbf16>
8-
%1 = onednn_graph.relu %0 : (tensor<128x256xbf16>) -> tensor<128x256xbf16>
9-
return %1 : tensor<128x256xbf16>
8+
: (tensor<128x512xbf16>, tensor<512x64xbf16>, tensor<64xbf16>) -> tensor<128x64xbf16>
9+
%1 = onednn_graph.relu %0 : (tensor<128x64xbf16>) -> tensor<128x64xbf16>
10+
%2 = onednn_graph.matmul %1, %weight1
11+
: (tensor<128x64xbf16>, tensor<64x256xbf16>) -> tensor<128x256xbf16>
12+
%3 = onednn_graph.add %2, %bias1 : (tensor<128x256xbf16>, tensor<256xbf16>) -> tensor<128x256xbf16>
13+
%4 = onednn_graph.relu %3 : (tensor<128x256xbf16>) -> tensor<128x256xbf16>
14+
return %4 : tensor<128x256xbf16>
1015
}
1116

1217
// CHECK-LABEL: @mlp_transpose_a

0 commit comments

Comments
 (0)