aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/tosa_mapping.py
diff options
context:
space:
mode:
authorPatrik Gustavsson <patrik.gustavsson@arm.com>2021-09-14 14:56:48 +0200
committerPatrik Gustavsson <patrik.gustavsson@arm.com>2021-09-15 13:21:16 +0200
commitf436ada9caea87ec2dd686a92e41a15c1dcdeb1d (patch)
tree5d3c136de06e0ee54833d2a379eb48cfd12ccd75 /ethosu/vela/tosa_mapping.py
parent0957e3ef4b94f17efb67429c88bab8ba650f78e8 (diff)
downloadethos-u-vela-f436ada9caea87ec2dd686a92e41a15c1dcdeb1d.tar.gz
TOSA: Support for TABLE operator (int8)
Added support to map TABLE operator to LUT. Limitations: -Only supported for int8 -TABLE input must be constant This also adds the support for TFLite legalisation of Tanh/Sigmoid (int8/uint8). Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com> Change-Id: I1a95f61fb02fdd42c4a690494418cc0765c8b275
Diffstat (limited to 'ethosu/vela/tosa_mapping.py')
-rw-r--r--ethosu/vela/tosa_mapping.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ethosu/vela/tosa_mapping.py b/ethosu/vela/tosa_mapping.py
index ebbaa0a1..f80a9156 100644
--- a/ethosu/vela/tosa_mapping.py
+++ b/ethosu/vela/tosa_mapping.py
@@ -196,7 +196,6 @@ unsupported_tosa_operators = {
TosaOp.MAXIMUM,
TosaOp.MINIMUM,
TosaOp.POW,
- TosaOp.TABLE,
TosaOp.ABS,
TosaOp.BITWISE_NOT,
TosaOp.CEIL,
@@ -274,7 +273,8 @@ tosa_operator_map = {
TosaOp.MUL: (Op.Mul, mul_attrs, None, TOSA_IFM_IFM2_INDICES),
# TODO TosaOp.POW
TosaOp.SUB: (Op.Sub, None, None, TOSA_IFM_IFM2_INDICES),
- # TODO TosaOp.TABLE
+ # TODO is table content in input[1] always constant?
+ TosaOp.TABLE: (Op.Table, None, None, TOSA_IFM_INDICES),
# TODO TosaOp.ABS
# TODO TosaOp.BITWISE_NOT
# TODO TosaOp.CEIL