MMatthias Springer[mlir][transform] Add transform.apply_dce op
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[mlir][transform] Add transform.apply_licm op This op applies loop-invariant code motion to the targeted loop-like op. Differential Revision: https://reviews.llvm.org/D154327 | 2 年前 | |
[mlir] Add transform.foreach_match Add a new transform op combinator that implements an "if-then-else" style of mechanism for applying transformations. Its main purpose is to serve as a higher-level driver when applying multiple transform scripts to potentially overlapping pieces of the payload IR. This is similar to how the various rewrite drivers operate in C++, but at a higher level and with more declarative expressions. This is not intended to replace existing pattern-based rewrites, but to to drive more complex transformations that are exposed in the transform dialect and are too complex to be expressed as simple declarative rewrites. Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D148013 | 3 年前 | |
[mlir] add structured (Linalg) transform op matchers Add a set of transform operations into the "structured" extension of the Transform dialect that allow one to select transformation targets more specifically than the currently available matching. In particular, add the mechanism for identifying the producers of operands (input and init in destination-passing style) and users of results, as well as mechanisms for reasoning about the shape of the iteration space. Additionally, add several transform operations to manipulate parameters that could be useful to implement more advanced selectors. Specifically, new operations let one produce and compare parameter values to implement shape-driven transformations. New operations are placed in separate files to decrease compilation time. Some relayering of the extension is necessary to avoid repeated generation of enums. Depends on D148013 Depends on D148014 Depends on D148015 Reviewed By: chelini Differential Revision: https://reviews.llvm.org/D148017 | 3 年前 | |
[mlir][transform] Add TransformRewriter All apply functions now have a TransformRewriter & parameter. This rewriter should be used to modify the IR. It has a TrackingListener attached and updates the internal handle-payload mappings based on rewrites. Implementations no longer need to create their own TrackingListener and IRRewriter. Error checking is integrated into applyTransform. Tracking listener errors are reported only for ops with the ReportTrackingListenerFailuresOpTrait trait attached, allowing for a gradual migration. Furthermore, errors can be silenced with an op attribute. Additional API will be added to TransformRewriter in subsequent revisions. This revision just adds an "empty" TransformRewriter class and updates all apply implementations. Differential Revision: https://reviews.llvm.org/D152427 | 3 年前 | |
[mlir] use shared pointer to prevent vector resizes from destroying ops The MapVector type stores key-value pairs in a vector, which, when resized, copies the entries and destroys the old ones. This causes the underlying operations to be deleted, subsequently causing segfaults. This patch makes the mappings map type refer to a shared pointer instead, so that resizing the vector doesn't call the operations' destructors. Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D154511 | 2 年前 | |
[mlir][transform] Add transform.apply_dce op Add a transform that eliminates dead operations. This is useful after certain transforms (such as fusion) that create/clone new IR but leave the original IR in place. Differential Revision: https://reviews.llvm.org/D155954 | 2 年前 | |
[mlir] integration tests for transform dialect matchers Add integration tests exercising transform dialect matchers for slightly larger compositions of structured ops, namely reductions and matrix multiplications with optional leading and trailing elementwise operations. Reviewed By: qcolombet Differential Revision: https://reviews.llvm.org/D154440 | 2 年前 |