diff options
author | Benjamin Klimczak <benjamin.klimczak@arm.com> | 2023-02-02 14:02:05 +0000 |
---|---|---|
committer | Benjamin Klimczak <benjamin.klimczak@arm.com> | 2023-02-10 13:45:18 +0000 |
commit | 7a661257b6adad0c8f53e32b42ced56a1e7d952f (patch) | |
tree | 938ad8578c5b9edc0573e810ce64ce0a5bda3d8c /tests/test_cli_helpers.py | |
parent | 50271dee0a84bfc481ce798184f07b5b0b4bc64d (diff) | |
download | mlia-7a661257b6adad0c8f53e32b42ced56a1e7d952f.tar.gz |
MLIA-769 Expand use of target/backend registries
- Use the target/backend registries to avoid hard-coded names.
- Cache target profiles to avoid re-loading them
Change-Id: I474b7c9ef23894e1d8a3ea06d13a37652054c62e
Diffstat (limited to 'tests/test_cli_helpers.py')
-rw-r--r-- | tests/test_cli_helpers.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_cli_helpers.py b/tests/test_cli_helpers.py index 8f7e4b0..6d19207 100644 --- a/tests/test_cli_helpers.py +++ b/tests/test_cli_helpers.py @@ -3,11 +3,13 @@ """Tests for the helper classes.""" from __future__ import annotations +from pathlib import Path from typing import Any import pytest from mlia.cli.helpers import CLIActionResolver +from mlia.cli.helpers import copy_profile_file_to_output_dir from mlia.nn.tensorflow.optimizations.select import OptimizationSettings @@ -139,3 +141,12 @@ class TestCliActionResolver: """Test checking operator compatibility info.""" resolver = CLIActionResolver(args) assert resolver.check_operator_compatibility() == expected_result + + +def test_copy_profile_file_to_output_dir(tmp_path: Path) -> None: + """Test if the profile file is copied into the output directory.""" + test_target_profile_name = "ethos-u55-128" + test_file_path = Path(f"{tmp_path}/{test_target_profile_name}.toml") + + copy_profile_file_to_output_dir(test_target_profile_name, tmp_path) + assert Path.is_file(test_file_path) |