reifyResultShapes now returns OpFoldResults instead of Values. This is often more efficient because many transformations immediately attempt to extract a constant from the reified values.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Should this be renamed now? E.g., reifyResultShapes now only sometimes reify. (I think folks are also reaching here for something closer to what onnx-mlir and others are doing)
Maybe, depending on what "reification" means. If you interpret it as "building some handle that you can pass around in C++" (Value or Attribute), the name is still correct.
Btw, I am preparing additional changes to this interface that would allow users to reify specific dimensions and populate a FlatAffineValueConstraints (so that the "reification results" of multiple chained ops can be combined and analyzed).
That sounds similar to what onnx-mlir does, have you looked at what they are doing? ( https://github.com/onnx/onnx-mlir/blob/main/src/Interface/ShapeHelperOpInterface.hpp may be good entry).
Thx for the pointer, it definitely looks similar. My approach is a bit different because we want to support lower/upper bounds in addition to EQ bounds. I posted an RFC on Discourse as this may be interesting for various downstream projects.