[Mlir-commits] [mlir] [mlir] Add inferContractionDims util for indexing map inputs (PR #76081)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Dec 21 08:28:50 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:

I need it here: https://github.com/openxla/iree/pull/15984
TLDR, We have an attribute on types tracking the indexing maps, so we don't have access to the actual op.

But this can also be useful more generally in cases where you only have access to indexing maps. For example, doing indexing map analysis before creating a new op. It seems like a potentially useful util to have to me.

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


More information about the Mlir-commits mailing list