aboutsummaryrefslogtreecommitdiff
path: root/src/mlia/backend
diff options
context:
space:
mode:
authorDiego Russo <diego.russo@arm.com>2022-10-19 23:22:35 +0100
committerDiego Russo <diego.russo@arm.com>2022-10-21 12:54:16 +0100
commit9d34cb72d45a6d0a2ec1063ebf32536c1efdba75 (patch)
tree6a3520297d76fcb146f6ee86eaf6026e7a56e0d2 /src/mlia/backend
parent4fa21325ec498adbf467876c2413c054d0e85c5b (diff)
downloadmlia-9d34cb72d45a6d0a2ec1063ebf32536c1efdba75.tar.gz
MLIA-671 Update generic inference runner to 22.08
Due to the new version of Corstone-310, the generic inference runner has been updated to 22.08: * The inference runner 22.08 doesn't have timing adapters because incompatible with new version of Corstone-310 * Remove some memory mode logic which is not needed anymore * Corstone-310 allows to run Ethos-U65 simulation hence adding the binary for enabling this case * Delete the inference runner 22.05 * Fix codebase and tests to cope with changes above Change-Id: I3dc894d7cb49b09102a19b0d7f588694a0f3b99f
Diffstat (limited to 'src/mlia/backend')
-rw-r--r--src/mlia/backend/manager.py35
1 files changed, 9 insertions, 26 deletions
diff --git a/src/mlia/backend/manager.py b/src/mlia/backend/manager.py
index c8fe0f7..6a61ab0 100644
--- a/src/mlia/backend/manager.py
+++ b/src/mlia/backend/manager.py
@@ -30,23 +30,16 @@ _SUPPORTED_SYSTEMS = {
},
"Corstone-310": {
"ethos-u55": "Corstone-310: Cortex-M85+Ethos-U55",
+ "ethos-u65": "Corstone-310: Cortex-M85+Ethos-U65",
},
}
-# Mapping system_name -> memory_mode -> application
+# Mapping system_name -> application
_SYSTEM_TO_APP_MAP = {
- "Corstone-300: Cortex-M55+Ethos-U55": {
- "Sram": "Generic Inference Runner: Ethos-U55 SRAM",
- "Shared_Sram": "Generic Inference Runner: Ethos-U55/65 Shared SRAM",
- },
- "Corstone-300: Cortex-M55+Ethos-U65": {
- "Shared_Sram": "Generic Inference Runner: Ethos-U55/65 Shared SRAM",
- "Dedicated_Sram": "Generic Inference Runner: Ethos-U65 Dedicated SRAM",
- },
- "Corstone-310: Cortex-M85+Ethos-U55": {
- "Sram": "Generic Inference Runner: Ethos-U55 SRAM",
- "Shared_Sram": "Generic Inference Runner: Ethos-U55/65 Shared SRAM",
- },
+ "Corstone-300: Cortex-M55+Ethos-U55": "Generic Inference Runner: Ethos-U55",
+ "Corstone-300: Cortex-M55+Ethos-U65": "Generic Inference Runner: Ethos-U65",
+ "Corstone-310: Cortex-M85+Ethos-U55": "Generic Inference Runner: Ethos-U55",
+ "Corstone-310: Cortex-M85+Ethos-U65": "Generic Inference Runner: Ethos-U65",
}
@@ -79,11 +72,7 @@ def get_all_system_names(backend: str) -> list[str]:
def get_all_application_names(backend: str) -> list[str]:
"""Get all applications supported by the backend."""
- app_set = {
- app
- for sys in get_all_system_names(backend)
- for app in _SYSTEM_TO_APP_MAP[sys].values()
- }
+ app_set = {_SYSTEM_TO_APP_MAP[sys] for sys in get_all_system_names(backend)}
return list(app_set)
@@ -93,7 +82,6 @@ class DeviceInfo:
device_type: Literal["ethos-u55", "ethos-u65"]
mac: int
- memory_mode: Literal["Sram", "Shared_Sram", "Dedicated_Sram"]
@dataclass
@@ -327,15 +315,10 @@ class GenericInferenceRunnerEthosU(GenericInferenceRunner):
f"for backend {backend}"
) from ex
- if system_name not in _SYSTEM_TO_APP_MAP:
- raise RuntimeError(f"System {system_name} is not installed")
-
try:
- app_name = _SYSTEM_TO_APP_MAP[system_name][device_info.memory_mode]
+ app_name = _SYSTEM_TO_APP_MAP[system_name]
except KeyError as err:
- raise RuntimeError(
- f"Unsupported memory mode {device_info.memory_mode}"
- ) from err
+ raise RuntimeError(f"System {system_name} is not installed") from err
return system_name, app_name