aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/test
diff options
context:
space:
mode:
authorFredrik Svedberg <fredrik.svedberg@arm.com>2022-09-16 16:24:55 +0200
committerFredrik Svedberg <fredrik.svedberg@arm.com>2022-09-26 14:52:00 +0000
commit88d5b128fc86cecfa96aae09a7e7e9095f76b2a4 (patch)
tree76de6d0918e465f93dfec1b2d3aa56a459f68bdf /ethosu/vela/test
parent1cd39493163ea4cf74266b2957a5e54d1ed059bf (diff)
downloadethos-u-vela-88d5b128fc86cecfa96aae09a7e7e9095f76b2a4.tar.gz
MLBEDSW-4075 PACK axis 0 + tanh fails with output diff
The test failed since the tanh had batch size > 1. Added checks for batch size for all supported operators. Signed-off-by: Fredrik Svedberg <fredrik.svedberg@arm.com> Change-Id: I3570352740c40eb96bd9db965dfa3c91c81ff2ad
Diffstat (limited to 'ethosu/vela/test')
-rw-r--r--ethosu/vela/test/test_tflite_supported_operators.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/ethosu/vela/test/test_tflite_supported_operators.py b/ethosu/vela/test/test_tflite_supported_operators.py
index 3872bdc8..35fc1a6f 100644
--- a/ethosu/vela/test/test_tflite_supported_operators.py
+++ b/ethosu/vela/test/test_tflite_supported_operators.py
@@ -550,25 +550,25 @@ def test_constraint_matching_quantization_parameters():
def test_constraint_elemwise_batch_size():
# BINARY CASE
- # Batch can be >1 if dims is <=2D
- op = testutil.create_elemwise_op(Op.Add, "op", [2, 2], [2, 2], [2, 2])
+ # Batch can be >1 if dims is <=3D
+ op = testutil.create_elemwise_op(Op.Add, "op", [2, 2, 2], [2, 2, 2], [2, 2, 2])
assert support.is_operator_supported(op)
- # For dims >2D, batch must be 1
- op = testutil.create_elemwise_op(Op.Add, "op", [1, 2, 2], [1, 2, 2], [1, 2, 2])
+ # For dims >3D, batch must be 1
+ op = testutil.create_elemwise_op(Op.Add, "op", [1, 2, 2, 2], [1, 2, 2, 2], [1, 2, 2, 2])
assert support.is_operator_supported(op)
# invalid case
- op = testutil.create_elemwise_op(Op.Add, "op", [2, 2, 2], [2, 2, 2], [2, 2, 2])
+ op = testutil.create_elemwise_op(Op.Add, "op", [2, 2, 2, 2], [2, 2, 2, 2], [2, 2, 2, 2])
assert not support.is_operator_supported(op)
# UNARY CASE
- # Batch can be >1 if dims is <=2D
- op = testutil.create_elemwise_op(Op.CLZ, "op", [2, 2], None, [2, 2], datatype=DataType.int32)
+ # Batch can be >1 if dims is <=3D
+ op = testutil.create_elemwise_op(Op.CLZ, "op", [2, 2, 2], None, [2, 2, 2], datatype=DataType.int32)
assert support.is_operator_supported(op)
- # For dims >2D, batch must be 1
- op = testutil.create_elemwise_op(Op.CLZ, "op", [1, 2, 2], None, [1, 2, 2], datatype=DataType.int32)
+ # For dims >3D, batch must be 1
+ op = testutil.create_elemwise_op(Op.CLZ, "op", [1, 2, 2, 2], None, [1, 2, 2, 2], datatype=DataType.int32)
assert support.is_operator_supported(op)
# invalid case
- op = testutil.create_elemwise_op(Op.CLZ, "op", [2, 2, 2], None, [2, 2, 2], datatype=DataType.int32)
+ op = testutil.create_elemwise_op(Op.CLZ, "op", [2, 2, 2, 2], None, [2, 2, 2, 2], datatype=DataType.int32)
assert not support.is_operator_supported(op)