[Mlir-commits] [mlir] [NFC] Make AggregateOpInterface part of mlir:: instead of linalg:: (PR #70089)
Abhishek Varma
llvmlistbot at llvm.org
Tue Oct 24 11:26:27 PDT 2023
https://github.com/Abhishek-Varma created https://github.com/llvm/llvm-project/pull/70089
-- Currently, AggregateOpInterface is part of mlir::linalg:: namespace
so this commit makes it part of a generic mlir:: namespace.
Signed-off-by: Abhishek Varma <abhvarma at amd.com>
>From 71ef51af357f1f6d67f74eaa8b76422c26723945 Mon Sep 17 00:00:00 2001
From: Abhishek Varma <avarma094 at gmail.com>
Date: Tue, 24 Oct 2023 18:23:55 +0000
Subject: [PATCH] [NFC] Make AggregateOpInterface part of mlir:: instead of
linalg::
-- Currently, AggregateOpInterface is part of mlir::linalg:: namespace
so this commit makes it part of a generic mlir:: namespace.
Signed-off-by: Abhishek Varma <abhishek at nod-labs.com>
---
.../Dialect/Linalg/IR/LinalgInterfaces.td | 30 -------------------
.../Interfaces/DestinationStyleOpInterface.td | 30 +++++++++++++++++++
2 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
index 44e82f452b3cef1..99b2520b5750da9 100644
--- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
+++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
@@ -817,34 +817,4 @@ def LinalgStructuredInterface
let verifyWithRegions = 1;
}
-def AggregatedOpInterface : OpInterface<"AggregatedOpInterface"> {
- let description = [{
- Interface for decomposing aggregated operations into a sequence of simpler
- ops.
- }];
- let cppNamespace = "::mlir::linalg";
- let methods = [
- InterfaceMethod<
- /*desc=*/[{
- Method to decompose the operation into simpler operations.
-
- On success, this method returns one `Value` per result in the
- original operation.
- The order of the returned values must match the order of the
- original values.
- In other words, the returned vector can be used directly with
- `RewriterBase::replaceOp(this, returnedValues)`.
- }],
- /*retType=*/"FailureOr<SmallVector<Value>>",
- /*methodName=*/"decomposeOperation",
- /*args=*/(ins
- "OpBuilder &":$b),
- /*methodBody=*/"",
- /*defaultImplementation=*/[{
- return {};
- }]
- >
- ];
-}
-
#endif // LINALG_IR_LINALGINTERFACES
diff --git a/mlir/include/mlir/Interfaces/DestinationStyleOpInterface.td b/mlir/include/mlir/Interfaces/DestinationStyleOpInterface.td
index 4c52d803e114762..fabe609d2190f4f 100644
--- a/mlir/include/mlir/Interfaces/DestinationStyleOpInterface.td
+++ b/mlir/include/mlir/Interfaces/DestinationStyleOpInterface.td
@@ -206,5 +206,35 @@ def DestinationStyleOpInterface : OpInterface<"DestinationStyleOpInterface"> {
let verifyWithRegions = 1;
}
+def AggregatedOpInterface : OpInterface<"AggregatedOpInterface"> {
+ let description = [{
+ Interface for decomposing aggregated operations into a sequence of simpler
+ ops.
+ }];
+ let cppNamespace = "::mlir";
+ let methods = [
+ InterfaceMethod<
+ /*desc=*/[{
+ Method to decompose the operation into simpler operations.
+
+ On success, this method returns one `Value` per result in the
+ original operation.
+ The order of the returned values must match the order of the
+ original values.
+ In other words, the returned vector can be used directly with
+ `RewriterBase::replaceOp(this, returnedValues)`.
+ }],
+ /*retType=*/"FailureOr<SmallVector<Value>>",
+ /*methodName=*/"decomposeOperation",
+ /*args=*/(ins
+ "OpBuilder &":$b),
+ /*methodBody=*/"",
+ /*defaultImplementation=*/[{
+ return {};
+ }]
+ >
+ ];
+}
+
#endif // MLIR_DESTINATIONSTYLEOPINTERFACE
More information about the Mlir-commits
mailing list