From 61a8313f5a0cbcfc7c8ee8a44f05a5ca9b1015b9 Mon Sep 17 00:00:00 2001 From: Jerry Ge Date: Tue, 20 Feb 2024 19:03:06 +0000 Subject: Add Tosa Sin/Cos to schema - Add Tosa Sin/Cos to the serialization_lib schema - Generated related header files with the new schema Signed-off-by: Jerry Ge Change-Id: If424ff2b64538e8ffd5342b6ebb9a022537d5c4c --- include/tosa_generated.h | 16 +++++++++++----- python/tosa/Op.py | 2 ++ schema/tosa.fbs | 2 ++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/include/tosa_generated.h b/include/tosa_generated.h index b5a8bd5..d21a17a 100644 --- a/include/tosa_generated.h +++ b/include/tosa_generated.h @@ -284,11 +284,13 @@ enum Op : uint32_t { Op_SUB_SHAPE = 76, Op_MUL_SHAPE = 77, Op_DIV_SHAPE = 78, + Op_COS = 79, + Op_SIN = 80, Op_MIN = Op_UNKNOWN, - Op_MAX = Op_DIV_SHAPE + Op_MAX = Op_SIN }; -inline const Op (&EnumValuesOp())[79] { +inline const Op (&EnumValuesOp())[81] { static const Op values[] = { Op_UNKNOWN, Op_ARGMAX, @@ -368,13 +370,15 @@ inline const Op (&EnumValuesOp())[79] { Op_ADD_SHAPE, Op_SUB_SHAPE, Op_MUL_SHAPE, - Op_DIV_SHAPE + Op_DIV_SHAPE, + Op_COS, + Op_SIN }; return values; } inline const char * const *EnumNamesOp() { - static const char * const names[80] = { + static const char * const names[82] = { "UNKNOWN", "ARGMAX", "AVG_POOL2D", @@ -454,13 +458,15 @@ inline const char * const *EnumNamesOp() { "SUB_SHAPE", "MUL_SHAPE", "DIV_SHAPE", + "COS", + "SIN", nullptr }; return names; } inline const char *EnumNameOp(Op e) { - if (::flatbuffers::IsOutRange(e, Op_UNKNOWN, Op_DIV_SHAPE)) return ""; + if (::flatbuffers::IsOutRange(e, Op_UNKNOWN, Op_SIN)) return ""; const size_t index = static_cast(e); return EnumNamesOp()[index]; } diff --git a/python/tosa/Op.py b/python/tosa/Op.py index c34f109..35b2b80 100644 --- a/python/tosa/Op.py +++ b/python/tosa/Op.py @@ -82,3 +82,5 @@ class Op(object): SUB_SHAPE = 76 MUL_SHAPE = 77 DIV_SHAPE = 78 + COS = 79 + SIN = 80 diff --git a/schema/tosa.fbs b/schema/tosa.fbs index 1c2a85e..e37c89a 100644 --- a/schema/tosa.fbs +++ b/schema/tosa.fbs @@ -127,6 +127,8 @@ enum Op:uint32 { SUB_SHAPE, MUL_SHAPE, DIV_SHAPE, + COS, + SIN, } union Attribute { -- cgit v1.2.1