This revision adds an additional reifyValueBounds helper that reifies the IR with Arith ops instead of Affine ops. This is needed to support value bounds for integer types different from index in a subsequent revision.
Depends On: D147987
Paths
| Differential D146524
[mlir][Arith] ValueBoundsOpInterface: Reify with Arith ops ClosedPublic Authored by springerm on Mar 21 2023, 6:34 AM.
Details Summary This revision adds an additional reifyValueBounds helper that reifies the IR with Arith ops instead of Affine ops. This is needed to support value bounds for integer types different from index in a subsequent revision. Depends On: D147987
Diff Detail
Event Timelinespringerm added a parent revision: D146356: [mlir][linalg] Remove `linalg::getUpperBoundForIndex` util.Mar 21 2023, 6:35 AM springerm mentioned this in D143910: [mlir][tensor] Add transform to make tensor.pad/empty loop-independent. springerm added a child revision: D143910: [mlir][tensor] Add transform to make tensor.pad/empty loop-independent.
springerm edited parent revisions, added: D147987: [mlir][affine] Split `reifyValueBound` in two functions; removed: D146356: [mlir][linalg] Remove `linalg::getUpperBoundForIndex` util. springerm added inline comments.
dcaballe added inline comments.
This revision is now accepted and ready to land.Apr 18 2023, 12:18 AM This revision was landed with ongoing or failed builds.Apr 18 2023, 12:55 AM Closed by commit rGd5b631240aac: [mlir][Arith] ValueBoundsOpInterface: Reify with Arith ops (authored by springerm). · Explain Why This revision was automatically updated to reflect the committed changes. springerm marked an inline comment as done.
Revision Contents
Diff 509972 mlir/include/mlir/Dialect/Arith/Transforms/Transforms.h
mlir/lib/Dialect/Arith/Transforms/CMakeLists.txt
mlir/lib/Dialect/Arith/Transforms/ReifyValueBounds.cpp
mlir/test/Dialect/Affine/value-bounds-reification.mlir
mlir/test/Dialect/Arith/value-bounds-op-interface-impl.mlir
mlir/test/lib/Dialect/Affine/CMakeLists.txt
mlir/test/lib/Dialect/Affine/TestReifyValueBounds.cpp
utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
|
I wonder if we could we make the non-index / index type output transparent to the user, i.e., we could have a single interface and then two internal implementations? Or even a single arith-based implementation and then try to fold ops into maps? Not sure if we have any utility that could help with that.
Otherwise, I think at least we should be more specific about the names... something like reifyIndexValueBound and reifyNonIndexValueBound?