aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Ge <jerry.ge@arm.com>2023-07-13 14:51:03 -0700
committerJerry Ge <jerry.ge@arm.com>2023-07-24 11:34:44 -0700
commitc0f23a089cb762110377ed3ef82edb0474c9e561 (patch)
tree3f2b3e8af570b86afa4b2640fce2e0712f97823b
parent7f41f140822a1200eec72845fac403afa2d90ced (diff)
downloadtosa_mlir_translator-c0f23a089cb762110377ed3ef82edb0474c9e561.tar.gz
Add Erf to tosa_mlir_translator
Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: I5d173daf4330d4c4761175a7bd2362cd0bf4b420
-rw-r--r--include/operator.def5
-rw-r--r--include/schema_operator.def5
-rw-r--r--src/TosaDeserialize.cpp1
-rw-r--r--src/TosaSerialize.cpp1
4 files changed, 8 insertions, 4 deletions
diff --git a/include/operator.def b/include/operator.def
index 3c766c4..21760fe 100644
--- a/include/operator.def
+++ b/include/operator.def
@@ -1,8 +1,8 @@
// 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
+// Licensed under the Apache License, Version 2.0 with LLVM Exceptions
+// (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// https://llvm.org/LICENSE.txt
@@ -35,6 +35,7 @@ DEF_OPERATOR(RFFT2d)
DEF_OPERATOR(TransposeConv2D)
/* activation */
+DEF_OPERATOR(Erf)
DEF_OPERATOR(Clamp)
DEF_OPERATOR(Sigmoid)
DEF_OPERATOR(Tanh)
diff --git a/include/schema_operator.def b/include/schema_operator.def
index 1af367e..a11eeeb 100644
--- a/include/schema_operator.def
+++ b/include/schema_operator.def
@@ -1,7 +1,7 @@
// Copyright (c) 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
+// Licensed under the Apache License, Version 2.0 with LLVM Exceptions
+// (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// https://llvm.org/LICENSE.txt
@@ -32,6 +32,7 @@ DEF_SCHEMA_OPERATOR(MAX_POOL2D)
DEF_SCHEMA_OPERATOR(TRANSPOSE_CONV2D)
DEF_SCHEMA_OPERATOR(CLAMP)
DEF_SCHEMA_OPERATOR(RESERVED)
+DEF_SCHEMA_OPERATOR(ERF)
DEF_SCHEMA_OPERATOR(SIGMOID)
DEF_SCHEMA_OPERATOR(TANH)
DEF_SCHEMA_OPERATOR(ADD)
diff --git a/src/TosaDeserialize.cpp b/src/TosaDeserialize.cpp
index 3f8a6ef..36e21f9 100644
--- a/src/TosaDeserialize.cpp
+++ b/src/TosaDeserialize.cpp
@@ -438,6 +438,7 @@ BUILD_OP_ELEMENTWISE_BINARY(Equal, EQUAL)
BUILD_OP_ELEMENTWISE_BINARY(Greater, GREATER)
BUILD_OP_ELEMENTWISE_BINARY(GreaterEqual, GREATER_EQUAL)
+BUILD_OP_ELEMENTWISE_UNARY(Erf, ERF)
BUILD_OP_ELEMENTWISE_UNARY(Sigmoid, SIGMOID)
BUILD_OP_ELEMENTWISE_UNARY(Tanh, TANH)
BUILD_OP_ELEMENTWISE_UNARY(Identity, IDENTITY)
diff --git a/src/TosaSerialize.cpp b/src/TosaSerialize.cpp
index 33d87d0..563a940 100644
--- a/src/TosaSerialize.cpp
+++ b/src/TosaSerialize.cpp
@@ -437,6 +437,7 @@ BUILD_OP_ELEMENTWISE_BINARY(Equal, EQUAL)
BUILD_OP_ELEMENTWISE_BINARY(Greater, GREATER)
BUILD_OP_ELEMENTWISE_BINARY(GreaterEqual, GREATER_EQUAL)
+BUILD_OP_ELEMENTWISE_UNARY(Erf, ERF)
BUILD_OP_ELEMENTWISE_UNARY(Sigmoid, SIGMOID)
BUILD_OP_ELEMENTWISE_UNARY(Tanh, TANH)
BUILD_OP_ELEMENTWISE_UNARY(Identity, IDENTITY)