[Mlir-commits] [mlir] [mlir][tosa] Update ConstOp to use Tosa_Tensor (PR #129959)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Mar 5 15:54:12 PST 2025


https://github.com/Jerry-Ge created https://github.com/llvm/llvm-project/pull/129959

Since we already defined Tosa_Tensor in TosaTypesBase.td, updated ConstOp to use that.


>From 291e890bff5a4655ca165d171b151c5e9405055a Mon Sep 17 00:00:00 2001
From: Jerry Ge <jerry.ge at arm.com>
Date: Wed, 5 Mar 2025 15:51:22 -0800
Subject: [PATCH] [mlir][tosa] Update ConstOp to use Tosa_Tensor

Since we already defined Tosa_Tensor in TosaTypesBase.td, updated
ConstOp to use that.

Signed-off-by: Jerry Ge <jerry.ge at arm.com>
Change-Id: If452150c05c0d7368e8c429ae074c3f0f27f77f0
---
 mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td b/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
index ff83e4072b6c0..61178a0110aa3 100644
--- a/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
+++ b/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
@@ -2359,7 +2359,7 @@ def Tosa_ConstOp : Tosa_Op<"const", [ConstantLike, Pure,
   );
 
   let results = (outs
-    TosaTensorOf<[AnyTypeOf<[Tosa_AnyNumber]>]>:$output
+    Tosa_Tensor:$output
   );
 
   list<Availability> availability = [



More information about the Mlir-commits mailing list