Skip to content

Commit

Permalink
[mlir] Extract DestinationStyleOpInterface from LinalgStructuredInter…
Browse files Browse the repository at this point in the history
…face.

There are several use cases where a destination style operation needs an interface
that contains a subset of the methods from LinalgStructuredInterface.
In this change, we move all such methods to a new interface, and add forwarding
methods to LinalgStructuredInterface to make the change the less invasive.
It may be possible to refactor the code later to get rid of (some or all) of the
forwarding methods.
This change also removes the cloneWithMapper interface methods, as it is not used anywhere.

RFC:
https://discourse.llvm.org/t/rfc-interface-for-destination-style-ops/64056

Differential Revision: https://reviews.llvm.org/D132125
  • Loading branch information
akuegel committed Aug 23, 2022
1 parent 0df7e1b commit d9cbefc
Show file tree
Hide file tree
Showing 5 changed files with 753 additions and 579 deletions.
3 changes: 3 additions & 0 deletions mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.h
Expand Up @@ -57,6 +57,9 @@ LogicalResult verifyFillInterface(Operation *op);
/// Verify that `op` conforms to the invariants of StructuredOpInterface
LogicalResult verifyStructuredOpInterface(Operation *op);

/// Verify that `op` conforms to the invariants of DestinationStyleOpInterface
LogicalResult verifyDestinationStyleOpInterface(Operation *op);

} // namespace detail
} // namespace linalg
} // namespace mlir
Expand Down

0 comments on commit d9cbefc

Please sign in to comment.