This patch teaches ValueBoundOpInterface how to handle tensor::CollapseShapeOp.
This cannot reason about two dynamic dimensions being collapsed into
a single dimension, as Presburger lib cannot represent multiplication of
variables.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/Tensor/IR/ValueBoundsOpInterfaceImpl.cpp | ||
---|---|---|
129 | If I remember correctly, multiplication of two symbols is currently not supported in ValueBoundsOpInterface because there is no flat representation in the FlatAffineValueConstraints, so cstr.bound() may not do anything. The implementation here is good, but maybe we should add a note/TODO as a comment. | |
mlir/test/Dialect/Tensor/value-bounds-op-interface-impl.mlir | ||
242 | You could add this: // TODO: Bounds that are a multiplication of two symbols are not supported. // expected-error @below{{could not reify bound}} %0 = "test.reify_bound"(%out) {dim = 0} : (tensor<?x?xf32>) -> (index) |
If I remember correctly, multiplication of two symbols is currently not supported in ValueBoundsOpInterface because there is no flat representation in the FlatAffineValueConstraints, so cstr.bound() may not do anything. The implementation here is good, but maybe we should add a note/TODO as a comment.