llvm-project/mlir/unittests/Interfaces
Jacques Pienaar 093493032d [mlir] Enable specifying querying function in ValueShapeRange
This enables querying shapes/values as shapes without mutating the IR
directly (e.g., towards enabling doing inference in analysis &
application steps, inferring function shape with constant from callsite,
...). Add a new ShapeAdaptor that abstracts over whether shape is from
Type or ShapedTypeComponents or DenseIntElementsAttribute. This adds new
accessors to ValueShapeRange to get Shape and value as shape, but
doesn't restrict or remove the previous way of accessing Type via the
Value for now, that does mean a less refined shape could be accidentally
queried and will be restricted in follow up.

Currently restricted Value query to what can be represented as Shape. So
only supports cases where constant subgraph evaluation's output is a
shape. I had considered making it more general, but without TBD extern
attribute concept or some such a user cannot today uniformly avoid
overhead.

Update TOSA ops and also the shape inference pass.

Differential Revision: https://reviews.llvm.org/D107768
2021-08-10 11:44:20 -07:00
..
CMakeLists.txt [mlir] Enable specifying querying function in ValueShapeRange 2021-08-10 11:44:20 -07:00
DataLayoutInterfacesTest.cpp [mlir][OpGen] Cache Identifiers for known attribute names in AbstractOperation. 2021-06-22 19:56:05 +00:00
InferTypeOpInterfaceTest.cpp [mlir] Enable specifying querying function in ValueShapeRange 2021-08-10 11:44:20 -07:00