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

Philip Lassen llvmlistbot at llvm.org
Fri Mar 29 16:16:37 PDT 2024


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

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.

>From 2d5f68024db153e056d0294aadcbb7270f85c6e2 Mon Sep 17 00:00:00 2001
From: philass <plassen at groq.com>
Date: Fri, 29 Mar 2024 16:13:16 -0700
Subject: [PATCH] [mlir][linalg] Delete unused SameVariadicOperandSize trait
 from transpose and broadcast

Signed-off-by: philass <plassen at groq.com>
---
 mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td | 2 --
 1 file changed, 2 deletions(-)

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 = [{



More information about the Mlir-commits mailing list