File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
test/gc-dialects/OneDNNGraph Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
// CHECK-LABEL: @mlp
4
4
func.func @mlp (%in: tensor <128 x512 xbf16 >,
5
- %weight0: tensor <512 x256 xbf16 >, %bias0: tensor <256 xbf16 >) -> tensor <128 x256 xbf16 > {
5
+ %weight0: tensor <512 x64 xbf16 >, %bias0: tensor <64 xbf16 >,
6
+ %weight1: tensor <64 x256 xbf16 >, %bias1: tensor <256 xbf16 >) -> tensor <128 x256 xbf16 > {
6
7
%0 = onednn_graph.matmul %in , %weight0 , %bias0
7
- : (tensor <128 x512 xbf16 >, tensor <512 x256 xbf16 >, tensor <256 xbf16 >) -> tensor <128 x256 xbf16 >
8
- %1 = onednn_graph.relu %0 : (tensor <128 x256 xbf16 >) -> tensor <128 x256 xbf16 >
9
- return %1 : tensor <128 x256 xbf16 >
8
+ : (tensor <128 x512 xbf16 >, tensor <512 x64 xbf16 >, tensor <64 xbf16 >) -> tensor <128 x64 xbf16 >
9
+ %1 = onednn_graph.relu %0 : (tensor <128 x64 xbf16 >) -> tensor <128 x64 xbf16 >
10
+ %2 = onednn_graph.matmul %1 , %weight1
11
+ : (tensor <128 x64 xbf16 >, tensor <64 x256 xbf16 >) -> tensor <128 x256 xbf16 >
12
+ %3 = onednn_graph.add %2 , %bias1 : (tensor <128 x256 xbf16 >, tensor <256 xbf16 >) -> tensor <128 x256 xbf16 >
13
+ %4 = onednn_graph.relu %3 : (tensor <128 x256 xbf16 >) -> tensor <128 x256 xbf16 >
14
+ return %4 : tensor <128 x256 xbf16 >
10
15
}
11
16
12
17
// CHECK-LABEL: @mlp_transpose_a
You can’t perform that action at this time.
0 commit comments