11 Commits

Author SHA1 Message Date
Frederik Gossen
11492be9d7 [MLIR][Shape] Lower shape.broadcast to scf
Differential Revision: https://reviews.llvm.org/D85027
2020-08-03 08:20:14 +00:00
Stephan Herhut
85defd23aa [mlir][shape] Use memref of index in shape lowering
Now that we can have a memref of index type, we no longer need to materialize shapes in i64 and then index_cast.

Differential Revision: https://reviews.llvm.org/D84938
2020-07-30 15:12:43 +02:00
Frederik Gossen
5fc34fafa7 [MLIR][Shape] Limit shape to SCF lowering patterns to their supported types
Differential Revision: https://reviews.llvm.org/D84444
2020-07-29 14:54:09 +00:00
Frederik Gossen
a85ca6be2a [MLIR][Shape] Simplify shape lowering
Differential Revision: https://reviews.llvm.org/D84161
2020-07-24 08:44:13 +00:00
Frederik Gossen
aca7b8dd63 [MLIR][Shape] Lower shape.shape_eq to scf
Lower `shape.shape_eq` to the `scf` (and `std`) dialect. For now, this lowering
is limited to extent tensor operands.

Differential Revision: https://reviews.llvm.org/D82530
2020-07-16 14:44:29 +00:00
Frederik Gossen
c430c21202 [MLIR][Shape] Use callback builder again
The issue that callback builders caused during rollback of conversion patterns
has been resolved. We can use them again.
See https://bugs.llvm.org/show_bug.cgi?id=46731

Differential Revision: https://reviews.llvm.org/D83932
2020-07-16 13:58:38 +00:00
Frederik Gossen
67391a7045 [MLIR] Lower shape.reduce to scf.for only when argument is tensor<?xindex>
To make it clear when shape error values cannot occur the shape operations can
operate on extent tensors. This change updates the lowering for `shape.reduce`
accordingly.

Differential Revision: https://reviews.llvm.org/D83944
2020-07-16 13:55:48 +00:00
Frederik Gossen
ad49330032 [MLIR][Shape] Fix shape_of lowering to scf
The use of the `scf.for` callback builder does not allow for a rollback of the
emitted conversions. Instead, we populate the loop body through the conversion
rewriter directly.

Differential Revision: https://reviews.llvm.org/D83873
2020-07-15 15:38:09 +00:00
Frederik Gossen
5a7cd5db3c [MLIR][Shape] Fix ambiguous symbol 2020-06-25 09:40:08 +00:00
Frederik Gossen
e34b88309e [MLIR][Shape] Lower shape_of for unranked tensors
Lower `shape_of` for unranked tensors.
Materializes shape in stack-allocated memory.

Differential Revision: https://reviews.llvm.org/D82196
2020-06-25 08:50:45 +00:00
Alexander Belyaev
3813f24e97 [mlir][shape] Add a pattern to rewrite shape.reduce as scf.for.
Differential Revision: https://reviews.llvm.org/D81694
2020-06-15 17:54:50 +02:00