diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_cli_commands.py | 15 | ||||
-rw-r--r-- | tests/test_nn_rewrite_core_rewrite.py | 6 |
2 files changed, 18 insertions, 3 deletions
diff --git a/tests/test_cli_commands.py b/tests/test_cli_commands.py index 5b2b947..e4b2609 100644 --- a/tests/test_cli_commands.py +++ b/tests/test_cli_commands.py @@ -84,6 +84,19 @@ def test_performance_unknown_target( ], [ "ethos-u55-256", + False, + False, + None, + None, + None, + True, + "fully-connected-sparsity24", + "sequential/flatten/Reshape", + "StatefulPartitionedCall:0", + does_not_raise(), + ], + [ + "ethos-u55-256", True, False, None, @@ -127,7 +140,7 @@ def test_performance_unknown_target( match=re.escape( "Invalid rewrite target: 'random'. " "Supported rewrites: ['fully-connected'," - " 'fully_connected_sparsity24']" + " 'fully-connected-sparsity24']" ), ), ], diff --git a/tests/test_nn_rewrite_core_rewrite.py b/tests/test_nn_rewrite_core_rewrite.py index d9c74ea..1d0100a 100644 --- a/tests/test_nn_rewrite_core_rewrite.py +++ b/tests/test_nn_rewrite_core_rewrite.py @@ -42,13 +42,15 @@ def test_rewrite() -> None: "rewrite_name, expected_error", [ ("fully-connected", does_not_raise()), + ("fully-connected-sparsity24", does_not_raise()), ("random", does_not_raise()), ], ) def test_rewrite_configuration( test_tflite_model_fp32: Path, rewrite_name: str, expected_error: Any ) -> None: - """Test get_rewrite function only supports rewrite type fully-connected.""" + """Test get_rewrite function only supports rewrite types + fully-connected and fully-connected-sparsity24.""" with expected_error: config_obj = RewriteConfiguration( rewrite_name, @@ -102,7 +104,7 @@ def test_builtin_rewrite_names() -> None: """Test if all builtin rewrites are properly registered and returned.""" assert RewritingOptimizer.builtin_rewrite_names() == [ "fully-connected", - "fully_connected_sparsity24", + "fully-connected-sparsity24", ] |