Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -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
);

Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion mlir/lib/Dialect/Tosa/Transforms/TosaProfileCompliance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down