[Mlir-commits] [mlir] [mlir][linalg] Delete unused SameVariadicOperandSize trait from ops (PR #87124)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Mar 29 16:17:07 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Philip Lassen (philass)

<details>
<summary>Changes</summary>

Both `Transpose` and `Broadcast` specify the `SameVariadicOperandSize` trait. However neither has a variadic operand let alone more than one.

This is likely a relic from copying the boilerplate of the `Reduce` definition.

---
Full diff: https://github.com/llvm/llvm-project/pull/87124.diff


1 Files Affected:

- (modified) mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td (-2) 


``````````diff
diff --git a/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td b/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
index 92d844eefb7207..5ee363ed325727 100644
--- a/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
+++ b/mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
@@ -391,7 +391,6 @@ def ReduceOp : LinalgStructuredBase_Op<"reduce", [
 
 def TransposeOp : LinalgStructuredBase_Op<"transpose", [
     DeclareOpInterfaceMethods<OpAsmOpInterface, ["getAsmResultNames"]>,
-    SameVariadicOperandSize,
     SingleBlockImplicitTerminator<"YieldOp">]> {
   let summary = "Transpose operator";
   let description = [{
@@ -470,7 +469,6 @@ def TransposeOp : LinalgStructuredBase_Op<"transpose", [
 
 def BroadcastOp : LinalgStructuredBase_Op<"broadcast", [
     DeclareOpInterfaceMethods<OpAsmOpInterface, ["getAsmResultNames"]>,
-    SameVariadicOperandSize,
     SingleBlockImplicitTerminator<"YieldOp">]> {
   let summary = "Static broadcast operator";
   let description = [{

``````````

</details>


https://github.com/llvm/llvm-project/pull/87124


More information about the Mlir-commits mailing list