Skip to content

Commit

Permalink
Update linalg.matmul syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
amanda849 committed Nov 13, 2023
1 parent 991a9b9 commit 9ce32b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mlir/dialects/linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ class LinalgMatmul(DialectOp):
_syntax_ = [("linalg.matmul"
" ins( {a_id.ssa_id} , {b_id.ssa_id} : {a_type.type} , {b_type.type} )"
" outs( {c_id.ssa_id} : {c_type.type} )"),
("linalg.matmul"
" ins( {a_id.ssa_id} , {b_id.ssa_id} : {a_type.type} , {b_type.type} )"
" outs( {c_id.ssa_id} : {c_type.type} ) -> {out_type.type}"),
("linalg.matmul"
" ins( {a_id.ssa_id} , {b_id.ssa_id} : {a_type.type} , {b_type.type} )"
" init( {c_id.ssa_id} : {c_type.type} ) -> {out_type.type}")]
Expand Down
1 change: 1 addition & 0 deletions tests/test_linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def test_matmul():
%B = view %arg0 [ %c0 ] [ %K, %N ] : memref<?xi8> to memref<?x?xf32>
%C = view %arg0 [ %c0 ] [ %M, %N ] : memref<?xi8> to memref<?x?xf32>
linalg.matmul ins( %A , %B : memref<?x?xf32> , memref<?x?xf32> ) outs( %C : memref<?x?xf32> )
linalg.matmul ins( %A , %B : memref<?x?xf32> , memref<?x?xf32> ) outs( %C : memref<?x?xf32> ) -> memref<?x?xf32>
return
}
}""")
Expand Down

0 comments on commit 9ce32b5

Please sign in to comment.