[Mlir-commits] [mlir] [mlir][tosa] Rename RFFT2D `input` to `input_real` (PR #130614)
Luke Hutton
llvmlistbot at llvm.org
Mon Mar 10 07:31:16 PDT 2025
https://github.com/lhutton1 created https://github.com/llvm/llvm-project/pull/130614
This is to align to the input name as defined in the specification.
>From 8290bda290374c4a777ef0421412617c0b4813b5 Mon Sep 17 00:00:00 2001
From: Luke Hutton <luke.hutton at arm.com>
Date: Mon, 10 Mar 2025 14:21:18 +0000
Subject: [PATCH] [mlir][tosa] Rename RFFT2D `input` to `input_real`
This is to align to the input name as defined in the
specification.
Change-Id: I9362cfd691c7bb24897240ebf105866b9a719a8a
Signed-off-by: Luke Hutton <luke.hutton at arm.com>
---
mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td | 4 ++--
mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp | 2 +-
mlir/lib/Dialect/Tosa/IR/TosaOps.cpp | 5 +++--
mlir/lib/Dialect/Tosa/Transforms/TosaProfileCompliance.cpp | 2 +-
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td b/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
index ecddc9fe9a13d..b876880597dd4 100644
--- a/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
+++ b/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
@@ -396,7 +396,7 @@ def Tosa_RFFT2dOp : Tosa_InferShapedTypeOp<"rfft2d", [
}];
let arguments = (ins
- Tosa_Tensor3D:$input,
+ Tosa_Tensor3D:$input_real,
DefaultValuedOptionalAttr<BoolAttr, "false">:$local_bound
);
@@ -411,7 +411,7 @@ def Tosa_RFFT2dOp : Tosa_InferShapedTypeOp<"rfft2d", [
];
let assemblyFormat = [{
- $input attr-dict `:` `(` type($input) `)` `->` `(` type($output_real) `,` type($output_imag) `)`
+ $input_real attr-dict `:` `(` type($input_real) `)` `->` `(` type($output_real) `,` type($output_imag) `)`
}];
let hasVerifier = 1;
diff --git a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
index f7dd33c7e8b53..ccfe28270322c 100644
--- a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
+++ b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
@@ -2614,7 +2614,7 @@ struct RFFT2dConverter final : public OpRewritePattern<RFFT2dOp> {
}
auto loc = rfft2d.getLoc();
- auto input = rfft2d.getInput();
+ auto input = rfft2d.getInputReal();
auto elementType =
dyn_cast<FloatType>(cast<ShapedType>(input.getType()).getElementType());
if (!elementType)
diff --git a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
index 7a991b3876f69..ffa540426cd71 100644
--- a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
+++ b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
@@ -805,7 +805,7 @@ LogicalResult tosa::RFFT2dOp::inferReturnTypeComponents(
MLIRContext *context, ::std::optional<Location> location,
RFFT2dOp::Adaptor adaptor,
SmallVectorImpl<ShapedTypeComponents> &inferredReturnShapes) {
- ShapeAdaptor inputShape(adaptor.getInput().getType());
+ ShapeAdaptor inputShape(adaptor.getInputReal().getType());
if (!inputShape.hasRank())
return failure();
@@ -842,7 +842,8 @@ LogicalResult tosa::RFFT2dOp::verify() {
if (failed(verifyCompatibleShapes(outputTypes)))
return emitOpError("expected output shapes to match, got ") << outputTypes;
- const auto inputType = llvm::dyn_cast<RankedTensorType>(getInput().getType());
+ const auto inputType =
+ llvm::dyn_cast<RankedTensorType>(getInputReal().getType());
if (!inputType)
return success();
diff --git a/mlir/lib/Dialect/Tosa/Transforms/TosaProfileCompliance.cpp b/mlir/lib/Dialect/Tosa/Transforms/TosaProfileCompliance.cpp
index 983062ffd7912..448a7e1982276 100644
--- a/mlir/lib/Dialect/Tosa/Transforms/TosaProfileCompliance.cpp
+++ b/mlir/lib/Dialect/Tosa/Transforms/TosaProfileCompliance.cpp
@@ -160,7 +160,7 @@ void ProfileInfoDepot::populateProfileInfo(tosa::FFT2dOp op) {
template <>
void ProfileInfoDepot::populateProfileInfo(tosa::RFFT2dOp op) {
- addValue(op.getInput());
+ addValue(op.getInputReal());
addValue(op.getOutputReal());
addValue(op.getOutputImag());
}
More information about the Mlir-commits
mailing list