From 5d81f37de09efe10f90512e50252be9c36925fcf Mon Sep 17 00:00:00 2001 From: Benjamin Klimczak Date: Mon, 11 Jul 2022 12:33:42 +0100 Subject: MLIA-551 Rework remains of AIET architecture Re-factoring the code base to further merge the old AIET code into MLIA. - Remove last traces of the backend type 'tool' - Controlled systems removed, including SSH protocol, controller, RunningCommand, locks etc. - Build command / build dir and deploy functionality removed from Applications and Systems - Moving working_dir() - Replace module 'output_parser' with new module 'output_consumer' and merge Base64 parsing into it - Change the output consumption to optionally remove (i.e. actually consume) lines - Use Base64 parsing in GenericInferenceOutputParser, replacing the regex-based parsing and remove the now unused regex parsing - Remove AIET reporting - Pre-install applications by moving them to src/mlia/resources/backends - Rename aiet-config.json to backend-config.json - Move tests from tests/mlia/ to tests/ - Adapt unit tests to code changes - Dependencies removed: paramiko, filelock, psutil - Fix bug in corstone.py: The wrong resource directory was used which broke the functionality to download backends. - Use f-string formatting. - Use logging instead of print. Change-Id: I768bc3bb6b2eda57d219ad01be4a8e0a74167d76 --- src/mlia/tools/metadata/corstone.py | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'src/mlia/tools/metadata') diff --git a/src/mlia/tools/metadata/corstone.py b/src/mlia/tools/metadata/corstone.py index a92f81c..6a3c1c8 100644 --- a/src/mlia/tools/metadata/corstone.py +++ b/src/mlia/tools/metadata/corstone.py @@ -13,7 +13,6 @@ from typing import List from typing import Optional import mlia.backend.manager as backend_manager -from mlia.backend.fs import get_backend_resources from mlia.tools.metadata.common import DownloadAndInstall from mlia.tools.metadata.common import Installation from mlia.tools.metadata.common import InstallationType @@ -24,7 +23,7 @@ from mlia.utils.filesystem import all_paths_valid from mlia.utils.filesystem import copy_all from mlia.utils.filesystem import get_mlia_resources from mlia.utils.filesystem import temp_directory -from mlia.utils.proc import working_directory +from mlia.utils.filesystem import working_directory logger = logging.getLogger(__name__) @@ -76,7 +75,7 @@ class BackendMetadata: """Return list of expected resources.""" resources = [self.system_config, *self.apps_resources] - return (get_backend_resources() / resource for resource in resources) + return (get_mlia_resources() / resource for resource in resources) @property def supported_platform(self) -> bool: @@ -314,12 +313,8 @@ def get_corstone_300_installation() -> Installation: metadata=BackendMetadata( name="Corstone-300", description="Corstone-300 FVP", - system_config="aiet/systems/corstone-300/aiet-config.json", - apps_resources=[ - "aiet/applications/inference_runner-sse-300-22.05.01-ethos-U55-Shared_Sram-TA", - "aiet/applications/inference_runner-sse-300-22.05.01-ethos-U55-Sram_Only-TA", - "aiet/applications/inference_runner-sse-300-22.05.01-ethos-U65-Dedicated_Sram-TA", - ], + system_config="backend_configs/systems/corstone-300/backend-config.json", + apps_resources=[], fvp_dir_name="corstone_300", download_artifact=DownloadArtifact( name="Corstone-300 FVP", @@ -346,7 +341,9 @@ def get_corstone_300_installation() -> Installation: "VHT_Corstone_SSE-300_Ethos-U65", ], copy_source=False, - system_config="aiet/systems/corstone-300-vht/aiet-config.json", + system_config=( + "backends_configs/systems/corstone-300-vht/backend-config.json" + ), ), ), backend_installer=Corstone300Installer(), @@ -363,11 +360,8 @@ def get_corstone_310_installation() -> Installation: metadata=BackendMetadata( name="Corstone-310", description="Corstone-310 FVP", - system_config="aiet/systems/corstone-310/aiet-config.json", - apps_resources=[ - "aiet/applications/inference_runner-sse-310-22.05.01-ethos-U55-Shared_Sram-TA", - "aiet/applications/inference_runner-sse-310-22.05.01-ethos-U55-Sram_Only-TA", - ], + system_config="backend_configs/systems/corstone-310/backend-config.json", + apps_resources=[], fvp_dir_name="corstone_310", download_artifact=None, supported_platforms=["Linux"], @@ -386,7 +380,9 @@ def get_corstone_310_installation() -> Installation: "VHT_Corstone_SSE-310", ], copy_source=False, - system_config="aiet/systems/corstone-310-vht/aiet-config.json", + system_config=( + "backend_configs/systems/corstone-310-vht/backend-config.json" + ), ), ), backend_installer=None, -- cgit v1.2.1