diff options
author | Patrik Gustavsson <patrik.gustavsson@arm.com> | 2020-11-13 09:02:31 +0100 |
---|---|---|
committer | patrik.gustavsson <patrik.gustavsson@arm.com> | 2020-11-16 09:11:31 +0000 |
commit | 2fa1588f9128e077ec02d195356e89eb17452f3f (patch) | |
tree | c519d61e20598f737e4675480eec3413ca73c627 /ethosu/vela/test/test_supported_operators.py | |
parent | e05de456770926fdc057478739d1b96b7f651756 (diff) | |
download | ethos-u-vela-2fa1588f9128e077ec02d195356e89eb17452f3f.tar.gz |
MLBEDSW-3350 Put softmax on CPU if beta < 0
Put softmax on CPU if beta < 0
Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com>
Change-Id: I4ec866dd44d14e2737c4cd96474e54bb770bfb3e
Diffstat (limited to 'ethosu/vela/test/test_supported_operators.py')
-rw-r--r-- | ethosu/vela/test/test_supported_operators.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ethosu/vela/test/test_supported_operators.py b/ethosu/vela/test/test_supported_operators.py index 7e13f42d..62de0d1d 100644 --- a/ethosu/vela/test/test_supported_operators.py +++ b/ethosu/vela/test/test_supported_operators.py @@ -382,6 +382,15 @@ def test_constraint_matching_shapes(): assert support.is_operator_supported(op) +def test_constraint_beta_value_range(): + # beta must be positive + op = testutil.create_op_with_quant_tensors(Op.Softmax, [1, 1, 1, 8], [1, 1, 1, 8]) + op.attrs["beta"] = -1.0 + assert not support.is_operator_supported(op) + op.attrs["beta"] = 0.0 + assert support.is_operator_supported(op) + + def test_constraint_splitv_inferred(): # SplitV requires a maximum of one inferred shape (-1) qp = testutil.default_quant_params() |