aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/test
diff options
context:
space:
mode:
authorJohan Alfven <johan.alfven@arm.com>2023-05-07 13:12:37 +0200
committerRickard Bolin <rickard.bolin@arm.com>2023-06-14 12:53:30 +0000
commit8e525ca8aad4a52b80c1986c5067b9b74fb3e321 (patch)
tree85f0a781d011aaf1c7631d34acea4398502a7a9f /ethosu/vela/test
parentc2c3063d05494f3968a7fead1b3118602fe100b9 (diff)
downloadethos-u-vela-8e525ca8aad4a52b80c1986c5067b9b74fb3e321.tar.gz
MLBEDSW-7748: Add RSQRT support
- Added RSQRT int8 support, implemented as LUT. - Added test to supported operators - Updated SUPPORTED_OPS.md Change-Id: I34904772e044be8d22a6dfe426edf85358a205b7 Signed-off-by: Johan Alfven <johan.alfven@arm.com>
Diffstat (limited to 'ethosu/vela/test')
-rw-r--r--ethosu/vela/test/test_tflite_supported_operators.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/ethosu/vela/test/test_tflite_supported_operators.py b/ethosu/vela/test/test_tflite_supported_operators.py
index cedf87af..4aca00da 100644
--- a/ethosu/vela/test/test_tflite_supported_operators.py
+++ b/ethosu/vela/test/test_tflite_supported_operators.py
@@ -662,3 +662,15 @@ def test_lstm_support():
op.inputs[23] = None
# Test restored valid configuration
assert support.is_operator_supported(op)
+
+
+def test_rsqrt_support():
+ # Test supported op (int8)
+ op = testutil.create_elemwise_op(Op.Rsqrt, "op", [1, 8, 8, 8], [1, 8, 8, 8], [1, 8, 8, 8], datatype=DataType.int8)
+ assert support.is_operator_supported(op)
+ # Test not supported op (uint8)
+ op = testutil.create_elemwise_op(Op.Rsqrt, "op", [1, 8, 8, 8], [1, 8, 8, 8], [1, 8, 8, 8], datatype=DataType.uint8)
+ assert not support.is_operator_supported(op)
+ # Test not supported op (int16)
+ op = testutil.create_elemwise_op(Op.Rsqrt, "op", [1, 8, 8, 8], [1, 8, 8, 8], [1, 8, 8, 8], datatype=DataType.int16)
+ assert not support.is_operator_supported(op)