[all-commits] [llvm/llvm-project] 58c188: [mlir][linalg] Fix `FoldInitTensorWithDimOp` if di...
Alexander Belyaev via All-commits
all-commits at lists.llvm.org
Mon Sep 6 01:48:16 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 58c188507f724feee181018bfb6a330be2c6ac9a
https://github.com/llvm/llvm-project/commit/58c188507f724feee181018bfb6a330be2c6ac9a
Author: Alexander Belyaev <pifon at google.com>
Date: 2021-09-06 (Mon, 06 Sep 2021)
Changed paths:
M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
Log Message:
-----------
[mlir][linalg] Fix `FoldInitTensorWithDimOp` if dim(init_tensor) is static.
It looks like it was a typo. Instead of `*maybeConstantIndex`,
`initTensorOp.getStaticSize(*maybeConstantIndex)` should be used to access the
dim size of the tensor. There is a test for that in `canonicalize.mlir`, but it
was working correctly because `ReplaceStaticShapeDims` was canonicalizing DimOp
before `FoldInitTensorWithDimOp`. So, to make the patterns more "orthogonal",
this case is disabled.
Differential Revision: https://reviews.llvm.org/D109247
More information about the All-commits
mailing list