[Mlir-commits] [mlir] Add `isBatchVecmat` utilities for `linalg.batch_vecmat` (PR #70284)
Nicolas Vasilache
llvmlistbot at llvm.org
Thu Oct 26 00:40:56 PDT 2023
================
@@ -120,6 +120,31 @@ bool mlir::isVecmat(ArrayAttr indexingMaps) {
return indexingMaps == maps;
}
+bool mlir::isBatchVecmat(ArrayAttr indexingMaps) {
+ if (indexingMaps.size() != 3)
+ return false;
+ AffineMap map0 = cast<AffineMapAttr>(indexingMaps[0]).getValue();
----------------
nicolasvasilache wrote:
you could use the `infer` utils which I find nicer to work with: https://github.com/llvm/llvm-project/blob/d1556e5efbf0cb671c0f6e403fc1eaf9153f8713/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp#L1325 your call :)
https://github.com/llvm/llvm-project/pull/70284
More information about the Mlir-commits
mailing list