aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Ge <jerry.ge@arm.com>2024-02-20 11:11:17 -0800
committerJerry Ge <jerry.ge@arm.com>2024-02-22 15:49:50 -0800
commit3bdc1904e7fef906f030ca61f81b1371ba528c0d (patch)
tree962487ad6db41ad30d82a452a1cd234f11c6f184
parentf5645effe818c2b0cb0124597bc761850616ba76 (diff)
downloadtosa_mlir_translator-3bdc1904e7fef906f030ca61f81b1371ba528c0d.tar.gz
Add Tosa Sin/Cos operators
- Add Tosa Sin/Cos operators to the tosa_mlir_translator - Update thirdparty/serialization_lib hash Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: Iea24913d3b295f5ca9fc50488b963e0ab54b11bd
-rw-r--r--include/operator.def2
-rw-r--r--include/schema_operator.def2
-rw-r--r--src/TosaDeserialize.cpp2
-rw-r--r--src/TosaSerialize.cpp2
m---------third_party/serialization_lib0
5 files changed, 8 insertions, 0 deletions
diff --git a/include/operator.def b/include/operator.def
index 5b0cc7f..0bd0d08 100644
--- a/include/operator.def
+++ b/include/operator.def
@@ -64,6 +64,7 @@ DEF_OPERATOR(Abs)
DEF_OPERATOR(BitwiseNot)
DEF_OPERATOR(Ceil)
DEF_OPERATOR(Clz)
+DEF_OPERATOR(Cos)
DEF_OPERATOR(Exp)
DEF_OPERATOR(Floor)
DEF_OPERATOR(Log)
@@ -71,6 +72,7 @@ DEF_OPERATOR(LogicalNot)
DEF_OPERATOR(Negate)
DEF_OPERATOR(Reciprocal)
DEF_OPERATOR(Rsqrt)
+DEF_OPERATOR(Sin)
/* elementwise - ternary */
DEF_OPERATOR(Select)
diff --git a/include/schema_operator.def b/include/schema_operator.def
index 675b4f2..02b639e 100644
--- a/include/schema_operator.def
+++ b/include/schema_operator.def
@@ -99,3 +99,5 @@ DEF_SCHEMA_OPERATOR(ADD_SHAPE)
DEF_SCHEMA_OPERATOR(SUB_SHAPE)
DEF_SCHEMA_OPERATOR(MUL_SHAPE)
DEF_SCHEMA_OPERATOR(DIV_SHAPE)
+DEF_SCHEMA_OPERATOR(COS)
+DEF_SCHEMA_OPERATOR(SIN) \ No newline at end of file
diff --git a/src/TosaDeserialize.cpp b/src/TosaDeserialize.cpp
index eb60173..1dcd88d 100644
--- a/src/TosaDeserialize.cpp
+++ b/src/TosaDeserialize.cpp
@@ -674,12 +674,14 @@ BUILD_OP_ELEMENTWISE_UNARY(Abs, ABS)
BUILD_OP_ELEMENTWISE_UNARY(BitwiseNot, BITWISE_NOT)
BUILD_OP_ELEMENTWISE_UNARY(Ceil, CEIL)
BUILD_OP_ELEMENTWISE_UNARY(Clz, CLZ)
+BUILD_OP_ELEMENTWISE_UNARY(Cos, COS)
BUILD_OP_ELEMENTWISE_UNARY(Exp, EXP)
BUILD_OP_ELEMENTWISE_UNARY(Floor, FLOOR)
BUILD_OP_ELEMENTWISE_UNARY(Log, LOG)
BUILD_OP_ELEMENTWISE_UNARY(LogicalNot, LOGICAL_NOT)
BUILD_OP_ELEMENTWISE_UNARY(Reciprocal, RECIPROCAL)
BUILD_OP_ELEMENTWISE_UNARY(Rsqrt, RSQRT)
+BUILD_OP_ELEMENTWISE_UNARY(Sin, SIN)
BUILD_OP_REDUCTION(ReduceAny, REDUCE_ANY)
BUILD_OP_REDUCTION(ReduceAll, REDUCE_ALL)
diff --git a/src/TosaSerialize.cpp b/src/TosaSerialize.cpp
index 0f5056d..3569893 100644
--- a/src/TosaSerialize.cpp
+++ b/src/TosaSerialize.cpp
@@ -591,12 +591,14 @@ BUILD_OP_ELEMENTWISE_UNARY(Abs, ABS)
BUILD_OP_ELEMENTWISE_UNARY(BitwiseNot, BITWISE_NOT)
BUILD_OP_ELEMENTWISE_UNARY(Ceil, CEIL)
BUILD_OP_ELEMENTWISE_UNARY(Clz, CLZ)
+BUILD_OP_ELEMENTWISE_UNARY(Cos, COS)
BUILD_OP_ELEMENTWISE_UNARY(Exp, EXP)
BUILD_OP_ELEMENTWISE_UNARY(Floor, FLOOR)
BUILD_OP_ELEMENTWISE_UNARY(Log, LOG)
BUILD_OP_ELEMENTWISE_UNARY(LogicalNot, LOGICAL_NOT)
BUILD_OP_ELEMENTWISE_UNARY(Reciprocal, RECIPROCAL)
BUILD_OP_ELEMENTWISE_UNARY(Rsqrt, RSQRT)
+BUILD_OP_ELEMENTWISE_UNARY(Sin, SIN)
BUILD_OP_REDUCTION(ReduceAny, REDUCE_ANY)
BUILD_OP_REDUCTION(ReduceAll, REDUCE_ALL)
diff --git a/third_party/serialization_lib b/third_party/serialization_lib
-Subproject a029f1f02707f40f6990df53fd4f56684490d58
+Subproject 61a8313f5a0cbcfc7c8ee8a44f05a5ca9b1015b