From c0f23a089cb762110377ed3ef82edb0474c9e561 Mon Sep 17 00:00:00 2001 From: Jerry Ge Date: Thu, 13 Jul 2023 14:51:03 -0700 Subject: Add Erf to tosa_mlir_translator Signed-off-by: Jerry Ge Change-Id: I5d173daf4330d4c4761175a7bd2362cd0bf4b420 --- include/operator.def | 5 +++-- include/schema_operator.def | 5 +++-- src/TosaDeserialize.cpp | 1 + src/TosaSerialize.cpp | 1 + 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) -- cgit v1.2.1