[Mlir-commits] [mlir] [mlir][linalg][nfc] Fix `linalg.matmul_transpose_a` def. (PR #97690)

Andrzej WarzyƄski llvmlistbot at llvm.org
Mon Jul 8 01:17:53 PDT 2024


================
@@ -1336,7 +1336,7 @@ structured_op: !LinalgStructuredOpConfig
     name: C
     kind: output_tensor
     type_var: U
-    shape_map: affine_map<()[s0, s1, s2] -> (s2, s1)>
+    shape_map: affine_map<()[s0, s1, s2] -> (s1, s2)>
----------------
banach-space wrote:

To keep the spec of `linalg.matmul_transpose_a` consistent with the other variants, this should be `(s0, s2)`:
* https://github.com/llvm/llvm-project/blob/e975ff0a223e79842b693e0ec4d3cac87963869a/mlir/include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yaml#L1412
* https://github.com/llvm/llvm-project/blob/e975ff0a223e79842b693e0ec4d3cac87963869a/mlir/include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yaml#L1094

Now, on line 1329, you'd want to change:
```
    shape_map: affine_map<()[s0, s1, s2] -> (s0, s1)>
```
to:
```
    shape_map: affine_map<()[s0, s1, s2] -> (s1, s0)>
```

As in, IIUC:
* `s0` -> M dim
* `s1` -> K dim
* `s2` -> N dim

https://github.com/llvm/llvm-project/pull/97690


More information about the Mlir-commits mailing list