[Mlir-commits] [mlir] [mlir] Add inferContractionDims util for indexing map inputs (PR #76081)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Dec 21 12:05:13 PST 2023
================
@@ -62,6 +62,8 @@ struct ContractionDimensions {
/// `k`, indices are returned in sorted order.
/// Returns a failure if any of `m`, `n` or `k` is empty.
FailureOr<ContractionDimensions> inferContractionDims(LinalgOp linalgOp);
+FailureOr<ContractionDimensions>
----------------
Max191 wrote:
Given the definition of the ContractionOpInterface, I think it makes sense to keep it restricted to 3 maps (lhs, rhs, out) https://github.com/llvm/llvm-project/blob/74a09bd1ec6066d56880df1ae1a2c0258442cee9/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td#L19-L35
Is there a more general form of a tensor contraction that you are thinking of? Perhaps something like that could live elsewhere to avoid confusion with the `ContractionOpInterface` defined here.
https://github.com/llvm/llvm-project/pull/76081
More information about the Mlir-commits
mailing list