From 4d04238050a50081f35d7e615b590d00e702f501 Mon Sep 17 00:00:00 2001 From: Tai Ly Date: Tue, 16 Jan 2024 19:52:58 +0000 Subject: [tosa_mlir_translator] Add Shape Ops Support - Add serialization/deserialization of tosa shape ops. - Changed TileOp's multiples from attribute to shape input. - Change 'shape' attribute of RESHAPE to an input Signed-off-by: Tai Ly Change-Id: I4329e621fd7637b1a3491c195fbda77d2a0ad23a --- include/operator.def | 10 +++++++++- include/schema_operator.def | 8 +++++++- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/operator.def b/include/operator.def index 6198c0e..5b0cc7f 100644 --- a/include/operator.def +++ b/include/operator.def @@ -1,5 +1,5 @@ -// Copyright (c) 2020-2023, ARM Limited. +// Copyright (c) 2020-2024, 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 @@ -119,3 +119,11 @@ DEF_OPERATOR(Custom) /* control flow operators */ DEF_OPERATOR(If) DEF_OPERATOR(While) + +/* shape operators */ +DEF_OPERATOR(ConstShape) +DEF_OPERATOR(ConcatShape) +DEF_OPERATOR(AddShape) +DEF_OPERATOR(SubShape) +DEF_OPERATOR(MulShape) +DEF_OPERATOR(DivShape) diff --git a/include/schema_operator.def b/include/schema_operator.def index 52c7ae4..675b4f2 100644 --- a/include/schema_operator.def +++ b/include/schema_operator.def @@ -1,4 +1,4 @@ -// Copyright (c) 2023, ARM Limited. +// Copyright (c) 2023-2024, 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 @@ -93,3 +93,9 @@ DEF_SCHEMA_OPERATOR(COND_IF) DEF_SCHEMA_OPERATOR(WHILE_LOOP) DEF_SCHEMA_OPERATOR(FFT2D) DEF_SCHEMA_OPERATOR(RFFT2D) +DEF_SCHEMA_OPERATOR(CONST_SHAPE) +DEF_SCHEMA_OPERATOR(CONCAT_SHAPE) +DEF_SCHEMA_OPERATOR(ADD_SHAPE) +DEF_SCHEMA_OPERATOR(SUB_SHAPE) +DEF_SCHEMA_OPERATOR(MUL_SHAPE) +DEF_SCHEMA_OPERATOR(DIV_SHAPE) -- cgit v1.2.1