aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/operator.def3
-rw-r--r--src/TosaSerialize.cpp16
2 files changed, 18 insertions, 1 deletions
diff --git a/include/operator.def b/include/operator.def
index 85bb5c9..51eaf82 100644
--- a/include/operator.def
+++ b/include/operator.def
@@ -1,5 +1,5 @@
-// Copyright (c) 2020-2021, ARM Limited.
+// Copyright (c) 2020-2023, ARM Limited.
//
// Licensed under the Apache License, Version 2.0 with LLVM Exceptions
// (the "License"); you may not use this file except in compliance with
@@ -30,6 +30,7 @@ DEF_OPERATOR(DepthwiseConv2D)
DEF_OPERATOR(FullyConnected)
DEF_OPERATOR(MatMul)
DEF_OPERATOR(MaxPool2d)
+DEF_OPERATOR(RFFT2d)
DEF_OPERATOR(TransposeConv2D)
/* activation */
diff --git a/src/TosaSerialize.cpp b/src/TosaSerialize.cpp
index 4bc67ea..547da8c 100644
--- a/src/TosaSerialize.cpp
+++ b/src/TosaSerialize.cpp
@@ -1351,6 +1351,22 @@ TosaSerializationOperatorBuilder::build<mlir::tosa::WhileOp>(
return tyop;
}
+template <>
+TosaSerializationOperator *
+TosaSerializationOperatorBuilder::build<mlir::tosa::RFFT2dOp>(
+ mlir::Operation &op) const {
+ std::string input_name = GetTensorName(op.getOperand(0));
+ std::string output_real_name = GetTensorName(op.getResult(0));
+ std::string output_imag_name = GetTensorName(op.getResult(1));
+
+ TosaSerializationOperator *tyop = new TosaSerializationOperator(
+ Op_RFFT2D, Attribute_NONE, nullptr,
+ std::vector<std::string>{input_name},
+ std::vector<std::string>{output_real_name, output_imag_name});
+
+ return tyop;
+}
+
/* End translating TOSA operator */
mlir::LogicalResult TosaSerializationRegionBuilder::BuildAllBlocksInRegion(std::vector<mlir::Value>& return_values) {
std::string region_name = ser_region->GetName();