The information is not tied to tensor.empty op and tensor.extract_slice
op. We can infer smallest static bounding box for pad transform if
they implement ReifyRankedShapedTypeOpInterface. The revision extends
the usability for downstream projects. No tests are added because the
existing tests cover the change, and most of MLIR
ReifyRankedShapedTypeOpInterface ops are covered in the tests, except
tensor.generate and bufferization.alloc_tensor ops.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I think this looks right to me. Not sure why the droppedDims were there to begin with. Whats done here should make it unnecessary.
Comment Actions
The droppedDims was needed because of tensor.extract_slice op. If it is a rank-reduced op, the number of elements in sizes does not match the rank of result type. The previous implementations uses getMixedSizes() and droppedDims to model it. Today the extract_slice op implements ReifyRankedShapedTypeOpInterface, so we can get the result sizes from the reifyResultShapes method. The logic is considered in ExtractSliceOp::reifyResultShapes, so we no longer need it.