[Mlir-commits] [mlir] Add `isBatchVecmat` utilities for `linalg.batch_vecmat` (PR #70284)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Oct 26 04:46:43 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();
----------------
bjacob wrote:

i see. nicer indeed, but i was copy and pasting other instances in this file. The move to `infer` looks like it would be a nice improvement, but should be done for the whole file togeteher, so, in a separate PR.

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


More information about the Mlir-commits mailing list