MMatthias Springer[mlir][transform] Add transform.apply_dce op
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[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][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][transform] generate transform module on-the-fly Add a TransformInterpreterPassBase capability to generate the (shared) module containing the transform script during the pass initialization. This is helpful to programmatically generate the script as opposed to parsing it from the textual module. Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D152185 | 3 年前 | |
[mlir][linalg][transform] Fix printing of TileToForall in edge case. The static_(num_threads|tile_sizes) attributes of this op are DefaultValuedOptionalAttrs, so they can be constructed *without* such an attribute. In other words, the following is a valid op (note the absense of the static_num_threads attribute): "builtin.module"() ({ "transform.sequence"() <{failure_propagation_mode = 1 : i32, operand_segment_sizes = array<i32: 0, 0>}> ({ ^bb0(%arg0: !pdl.operation, %arg1: !transform.op<"linalg.matmul">, %arg2: !transform.op<"linalg.elemwise_binary">): %0 = "transform.structured.match"(%arg0) <{ops = ["test.dummy"]}> : (!pdl.operation) -> !pdl.operation %1:2 = "transform.structured.tile_to_forall_op"(%arg1, %0) <{operand_segment_sizes = array<i32: 1, 0, 0, 0, 1>}> : (!transform.op<"linalg.matmul">, !pdl.operation) -> (!transform.op<"scf.forall">, !transform.op<"linalg.matmul">) "transform.yield"() : () -> () }) : () -> () }) : () -> () However, the custom printing directive converted those to an ArrayRef, which crashes if done on an empty ArrayAttr. This patch changes the signature such that no automatic conversion takes place and extends the test to test for existinnce of the attribute. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D155062 | 2 年前 | |
[mlir] move PDL-related transform ops into an extension The initial bring-up of the Transform dialect relied on PDL to provide the default handle type ( !pdl.operation) and the matching capability. Both are now provided natively by the Transform dialect removing the reason to have a hard dependency on the PDL dialect and its interpreter. Move PDL-related transform operations into a separate extension. This requires us to introduce a dialect state extension mechanism into the Transform dialect so it no longer needs to know about PDL constraint functions that may be injected by extensions similarly to operations and types. This mechanism will be reused to connect pattern application drivers and the Transform dialect. This completes the restructuring of the Transform dialect to remove overrilance on PDL. Note to downstreams: flow that are using !pdl.operation with Transform dialect operations will now require transform::PDLExtension to be applied to the transform dialect in order to provide the transform handle type interface for !pdl.operation. Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D151104 | 3 年前 |