This op extracts an extent from a shape.
This also is the first op which constant folds to shape.const_size,
which revealed that sahpe.const_size needs a folder (ConstantLike ops
seem to always need folders for the constant folding infra to work).
Paths
| Differential D80394
Add `shape.get_extent`. ClosedPublic Authored by silvas on May 21 2020, 11:33 AM.
Details Summary This op extracts an extent from a shape. This also is the first op which constant folds to shape.const_size,
Diff Detail
Event Timelinejpienaar marked an inline comment as done. Comment ActionsNice, thanks
This revision is now accepted and ready to land.May 24 2020, 9:05 PM Comment Actions Just a note of a typo in your commit message "sahpe". I see you updated the diff with an updated commit message, so I'm guessing it's fixed, but arc doesn't propagate updated commit messages unfortunately.
silvas added inline comments.
Closed by commit rGcf42b704391c: [mlir][shape] Add `shape.get_extent`. (authored by silvas). · Explain WhyMay 26 2020, 5:28 PM This revision was automatically updated to reflect the committed changes. silvas marked 2 inline comments as done.
Revision Contents
Diff 266385 mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
mlir/lib/Dialect/Shape/IR/Shape.cpp
mlir/test/Dialect/Shape/canonicalize.mlir
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This fits on one line
[I'm actually not sure why this one isn't generated by default, we have the generation for unwrapped types that I would have expected to trigger here ...]