[Mlir-commits] [mlir] 1528b70 - [mlir][Linalg] NFC - Extract inferGemmDims - Amend forgotten changes
Nicolas Vasilache
llvmlistbot at llvm.org
Tue Feb 7 10:16:54 PST 2023
Author: Nicolas Vasilache
Date: 2023-02-07T10:16:46-08:00
New Revision: 1528b704995c53b384542d11b488ffeb12f2a85e
URL: https://github.com/llvm/llvm-project/commit/1528b704995c53b384542d11b488ffeb12f2a85e
DIFF: https://github.com/llvm/llvm-project/commit/1528b704995c53b384542d11b488ffeb12f2a85e.diff
LOG: [mlir][Linalg] NFC - Extract inferGemmDims - Amend forgotten changes
Added:
Modified:
mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
index 2ab94bce70d2..6e64d7136e2d 100644
--- a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
+++ b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
@@ -1341,7 +1341,7 @@ bool transform::containsMostMinorGemm(LinalgOp linalgOp) {
if (failed(res))
return false;
int64_t numLoops = linalgOp.getNumLoops();
- for (DenseSet<int64_t> &s : {res->mPos, res->nPos, res->kPos}) {
+ for (const DenseSet<int64_t> &s : {res->mPos, res->nPos, res->kPos}) {
if (s.contains(numLoops - 3) || s.contains(numLoops - 2) ||
s.contains(numLoops - 1))
continue;
@@ -1441,10 +1441,10 @@ packGemmGreedily(RewriterBase &rewriter, LinalgOp linalgOp,
// TODO: If we wanted to give the genericOp a name after packing, after
// calling `pack` would be a good time.
- auto res = linalg::pack(rewriter, genericOp, adjustedPackedSizes);
- assert(containsMostMinorGemm(res->packedLinalgOp) &&
+ auto packingRes = linalg::pack(rewriter, genericOp, adjustedPackedSizes);
+ assert(containsMostMinorGemm(packingRes->packedLinalgOp) &&
"failed to pack to a most minor gemm");
- return res;
+ return packingRes;
}
DiagnosedSilenceableFailure
More information about the Mlir-commits
mailing list