Skip to content

Commit

Permalink
dialects: (linalg) quantized matmul op generic prints 5 affinemaps (#…
Browse files Browse the repository at this point in the history
…3772)

The two zero points given also need affinemaps (even though they are
integers)
  • Loading branch information
jorendumoulin authored Jan 20, 2025
1 parent 40aaea2 commit 5c96c6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/filecheck/dialects/linalg/linalg_ops.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,4 @@ linalg.quantized_matmul ins(%5, %6, %7, %8 : tensor<64x9216xi8>, tensor<9216x409
// CHECK-GENERIC-NEXT: %45 = "arith.muli"(%42, %44) <{overflowFlags = #arith.overflow<none>}> : (i32, i32) -> i32
// CHECK-GENERIC-NEXT: %46 = "arith.addi"(%40, %45) <{overflowFlags = #arith.overflow<none>}> : (i32, i32) -> i32
// CHECK-GENERIC-NEXT: "linalg.yield"(%46) : (i32) -> ()
// CHECK-GENERIC-NEXT: }) {linalg.memoized_indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d2)>, affine_map<(d0, d1, d2) -> (d2, d1)>, affine_map<(d0, d1, d2) -> (d0, d1)>]} : (tensor<64x9216xi8>, tensor<9216x4096xi8>, i32, i32, tensor<64x4096xi32>) -> tensor<64x4096xi32>
// CHECK-GENERIC-NEXT: }) {linalg.memoized_indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d2)>, affine_map<(d0, d1, d2) -> (d2, d1)>, affine_map<(d0, d1, d2) -> ()>, affine_map<(d0, d1, d2) -> ()>, affine_map<(d0, d1, d2) -> (d0, d1)>]} : (tensor<64x9216xi8>, tensor<9216x4096xi8>, i32, i32, tensor<64x4096xi32>) -> tensor<64x4096xi32>
2 changes: 2 additions & 0 deletions xdsl/dialects/linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,8 @@ def hidden_region(args: tuple[BlockArgument, ...]) -> None:
[
AffineMapAttr(AffineMap.from_callable(lambda i, _, k: (i, k))),
AffineMapAttr(AffineMap.from_callable(lambda _, j, k: (k, j))),
AffineMapAttr(AffineMap(3, 0, ())),
AffineMapAttr(AffineMap(3, 0, ())),
AffineMapAttr(AffineMap.from_callable(lambda i, j, _: (i, j))),
]
)
Expand Down

0 comments on commit 5c96c6e

Please sign in to comment.