[Mlir-commits] [mlir] [mlir] Add ContractionOpInterface utility functions for vector matrix multiplication (PR #68945)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Oct 16 13:07:05 PDT 2023
================
@@ -49,6 +49,24 @@ bool isColumnMajorMatmul(ArrayAttr indexingMaps);
/// the reduction.
bool isRowMajorBatchMatmul(ArrayAttr indexingMaps);
+/// Tests whether the given maps describe a vector matrix multiplication. The
+/// test is permutation-invariant. Note that this only checks the affine maps
+/// from an operation, so does not perform any checks on the math being
+/// performed within the reduction.
+bool isVecmat(ArrayAttr indexingMaps);
+
+/// Tests whether the given maps describe a matrix vector multiplication. The
+/// test is permutation-invariant. Note that this only checks the affine maps
+/// from an operation, so does not perform any checks on the math being
+/// performed within the reduction.
+bool isMatvec(ArrayAttr indexingMaps);
+
+/// Tests whether the given maps describe a batch matrix vector multiplication.
+/// The test is permutation-invariant. Note that this only checks the affine
+/// maps from an operation, so does not perform any checks on the math being
+/// performed within the reduction.
+bool isBatchMatvec(ArrayAttr indexingMaps);
----------------
NatashaKnk wrote:
My I kept them as vecmat/matvec since that's what the Linalg op is called. I agree that your version is clearer, but I'm not sure if it's better to stay consistent. Wdyt?
https://github.com/llvm/llvm-project/pull/68945
More information about the Mlir-commits
mailing list