aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--src/mlia/backend/manager.py35
-rw-r--r--src/mlia/devices/ethosu/performance.py1
-rw-r--r--src/mlia/resources/backend_configs/systems/corstone-310-vht/backend-config.json34
-rw-r--r--src/mlia/resources/backend_configs/systems/corstone-310/backend-config.json34
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Shared_Sram-TA/backend-config.json17
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Shared_Sram-TA/ethos-u-inference_runner.axfbin426496 -> 0 bytes
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Sram_Only-TA/ethos-u-inference_runner.axfbin426544 -> 0 bytes
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U55-Default-noTA/backend-config.json (renamed from src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Sram_Only-TA/backend-config.json)2
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U55-Default-noTA/backend-config.json.license (renamed from src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Shared_Sram-TA/backend-config.json.license)0
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U55-Default-noTA/ethos-u-inference_runner.axfbin0 -> 1590848 bytes
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U55-Default-noTA/ethos-u-inference_runner.axf.license (renamed from src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Shared_Sram-TA/ethos-u-inference_runner.axf.license)0
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U65-Default-noTA/backend-config.json (renamed from src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U65-Dedicated_Sram-TA/backend-config.json)2
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U65-Default-noTA/backend-config.json.license (renamed from src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Sram_Only-TA/backend-config.json.license)0
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U65-Default-noTA/ethos-u-inference_runner.axf (renamed from src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U65-Dedicated_Sram-TA/ethos-u-inference_runner.axf)bin2524028 -> 3688044 bytes
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U65-Default-noTA/ethos-u-inference_runner.axf.license (renamed from src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Sram_Only-TA/ethos-u-inference_runner.axf.license)0
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Shared_Sram-TA/ethos-u-inference_runner.axfbin426488 -> 0 bytes
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Sram_Only-TA/backend-config.json.license3
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Sram_Only-TA/ethos-u-inference_runner.axfbin426536 -> 0 bytes
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Sram_Only-TA/ethos-u-inference_runner.axf.license31
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U55-Default-noTA/backend-config.json (renamed from src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Sram_Only-TA/backend-config.json)2
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U55-Default-noTA/backend-config.json.license (renamed from src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U65-Dedicated_Sram-TA/backend-config.json.license)0
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U55-Default-noTA/ethos-u-inference_runner.axfbin0 -> 1623728 bytes
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U55-Default-noTA/ethos-u-inference_runner.axf.license (renamed from src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U65-Dedicated_Sram-TA/ethos-u-inference_runner.axf.license)0
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U65-Default-noTA/backend-config.json (renamed from src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Shared_Sram-TA/backend-config.json)4
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U65-Default-noTA/backend-config.json.license (renamed from src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Shared_Sram-TA/backend-config.json.license)0
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U65-Default-noTA/ethos-u-inference_runner.axfbin0 -> 3782308 bytes
-rw-r--r--src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U65-Default-noTA/ethos-u-inference_runner.axf.license (renamed from src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Shared_Sram-TA/ethos-u-inference_runner.axf.license)0
-rw-r--r--src/mlia/tools/metadata/corstone.py2
-rw-r--r--tests/test_backend_manager.py142
-rw-r--r--tests/test_tools_metadata_corstone.py8
30 files changed, 159 insertions, 158 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
diff --git a/src/mlia/devices/ethosu/performance.py b/src/mlia/devices/ethosu/performance.py
index e89a65a..acc82e0 100644
--- a/src/mlia/devices/ethosu/performance.py
+++ b/src/mlia/devices/ethosu/performance.py
@@ -182,7 +182,6 @@ class CorstonePerformanceEstimator(
device_info = backend_manager.DeviceInfo(
device_type=self.device.target, # type: ignore
mac=self.device.mac,
- memory_mode=self.device.compiler_options.memory_mode, # type: ignore
)
corstone_perf_metrics = backend_manager.estimate_performance(
diff --git a/src/mlia/resources/backend_configs/systems/corstone-310-vht/backend-config.json b/src/mlia/resources/backend_configs/systems/corstone-310-vht/backend-config.json
index bbcadfd..dcb105a 100644
--- a/src/mlia/resources/backend_configs/systems/corstone-310-vht/backend-config.json
+++ b/src/mlia/resources/backend_configs/systems/corstone-310-vht/backend-config.json
@@ -34,5 +34,39 @@
}
]
}
+ },
+ {
+ "name": "Corstone-310: Cortex-M85+Ethos-U65",
+ "description": "Cortex-M85 and Ethos-U65 functional model implementations based on Corstone-310 design for MPS3 board.",
+ "annotations": {
+ "ip_class": "Ethos-U65",
+ "sim_type": "FM",
+ "variant": "Cortex-M85+Ethos-U65"
+ },
+ "commands": {
+ "run": [
+ "/opt/VHT/VHT_Corstone_SSE-310_Ethos-U65 -a {software.variables:eval_app} {user_params:input_file}@0x90000000 -C {user_params:mac} -C mps3_board.telnetterminal0.start_telnet=0 -C mps3_board.uart0.out_file='-' -C mps3_board.uart0.shutdown_on_eot=1 -C mps3_board.visualisation.disable-visualisation=1 --stat"
+ ]
+ },
+ "user_params": {
+ "run": [
+ {
+ "name": "--data",
+ "description": "Full file name for a custom model. Model must be in TensorFlow Lite format compiled with Vela.",
+ "values": [],
+ "alias": "input_file"
+ },
+ {
+ "name": "ethosu.num_macs=",
+ "description": "Arm Ethos-U65 configuration - the number represents MACs per cycle.",
+ "values": [
+ "256",
+ "512"
+ ],
+ "default_value": "512",
+ "alias": "mac"
+ }
+ ]
+ }
}
]
diff --git a/src/mlia/resources/backend_configs/systems/corstone-310/backend-config.json b/src/mlia/resources/backend_configs/systems/corstone-310/backend-config.json
index e0b1d1d..6f4f89b 100644
--- a/src/mlia/resources/backend_configs/systems/corstone-310/backend-config.json
+++ b/src/mlia/resources/backend_configs/systems/corstone-310/backend-config.json
@@ -34,5 +34,39 @@
}
]
}
+ },
+ {
+ "name": "Corstone-310: Cortex-M85+Ethos-U65",
+ "description": "Cortex-M85 and Ethos-U65 functional model implementations based on Corstone-310 design for MPS3 board.",
+ "annotations": {
+ "ip_class": "Ethos-U65",
+ "sim_type": "FM",
+ "variant": "Cortex-M85+Ethos-U65"
+ },
+ "commands": {
+ "run": [
+ "FVP_Corstone_SSE-310_Ethos-U65 -a {software.variables:eval_app} {user_params:input_file}@0x90000000 -C {user_params:mac} -C mps3_board.telnetterminal0.start_telnet=0 -C mps3_board.uart0.out_file='-' -C mps3_board.uart0.shutdown_on_eot=1 -C mps3_board.visualisation.disable-visualisation=1 --stat"
+ ]
+ },
+ "user_params": {
+ "run": [
+ {
+ "name": "--data",
+ "description": "Full file name for a custom model. Model must be in TensorFlow Lite format compiled with Vela.",
+ "values": [],
+ "alias": "input_file"
+ },
+ {
+ "name": "ethosu.num_macs=",
+ "description": "Arm Ethos-U65 configuration - the number represents MACs per cycle.",
+ "values": [
+ "256",
+ "512"
+ ],
+ "default_value": "512",
+ "alias": "mac"
+ }
+ ]
+ }
}
]
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Shared_Sram-TA/backend-config.json b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Shared_Sram-TA/backend-config.json
deleted file mode 100644
index 4856d27..0000000
--- a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Shared_Sram-TA/backend-config.json
+++ /dev/null
@@ -1,17 +0,0 @@
-[
- {
- "name": "Generic Inference Runner: Ethos-U55/65 Shared SRAM",
- "description": "This application allows running inferences using custom NN TensorFlow Lite models on Ethos-U. No data pre-/post-processing is executed.",
- "supported_systems": [
- {
- "name": "Corstone-300: Cortex-M55+Ethos-U55"
- },
- {
- "name": "Corstone-300: Cortex-M55+Ethos-U65"
- }
- ],
- "variables": {
- "eval_app": "{software.config_dir}/ethos-u-inference_runner.axf"
- }
- }
-]
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Shared_Sram-TA/ethos-u-inference_runner.axf b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Shared_Sram-TA/ethos-u-inference_runner.axf
deleted file mode 100644
index 4c50e1f..0000000
--- a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Shared_Sram-TA/ethos-u-inference_runner.axf
+++ /dev/null
Binary files differ
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Sram_Only-TA/ethos-u-inference_runner.axf b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Sram_Only-TA/ethos-u-inference_runner.axf
deleted file mode 100644
index 850e2eb..0000000
--- a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Sram_Only-TA/ethos-u-inference_runner.axf
+++ /dev/null
Binary files differ
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Sram_Only-TA/backend-config.json b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U55-Default-noTA/backend-config.json
index 3b512ff..4d8c928 100644
--- a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Sram_Only-TA/backend-config.json
+++ b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U55-Default-noTA/backend-config.json
@@ -1,6 +1,6 @@
[
{
- "name": "Generic Inference Runner: Ethos-U55 SRAM",
+ "name": "Generic Inference Runner: Ethos-U55",
"description": "This application allows running inferences using custom NN TensorFlow Lite models on Ethos-U. No data pre-/post-processing is executed.",
"supported_systems": [
{
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Shared_Sram-TA/backend-config.json.license b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U55-Default-noTA/backend-config.json.license
index 9b83bfc..9b83bfc 100644
--- a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Shared_Sram-TA/backend-config.json.license
+++ b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U55-Default-noTA/backend-config.json.license
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U55-Default-noTA/ethos-u-inference_runner.axf b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U55-Default-noTA/ethos-u-inference_runner.axf
new file mode 100644
index 0000000..c5b4e3e
--- /dev/null
+++ b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U55-Default-noTA/ethos-u-inference_runner.axf
Binary files differ
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Shared_Sram-TA/ethos-u-inference_runner.axf.license b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U55-Default-noTA/ethos-u-inference_runner.axf.license
index 8896f92..8896f92 100644
--- a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Shared_Sram-TA/ethos-u-inference_runner.axf.license
+++ b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U55-Default-noTA/ethos-u-inference_runner.axf.license
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U65-Dedicated_Sram-TA/backend-config.json b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U65-Default-noTA/backend-config.json
index fc0569f..22ba2d9 100644
--- a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U65-Dedicated_Sram-TA/backend-config.json
+++ b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U65-Default-noTA/backend-config.json
@@ -1,6 +1,6 @@
[
{
- "name": "Generic Inference Runner: Ethos-U65 Dedicated SRAM",
+ "name": "Generic Inference Runner: Ethos-U65",
"description": "This application allows running inferences using custom NN TensorFlow Lite models on Ethos-U. No data pre-/post-processing is executed.",
"supported_systems": [
{
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Sram_Only-TA/backend-config.json.license b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U65-Default-noTA/backend-config.json.license
index 9b83bfc..9b83bfc 100644
--- a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Sram_Only-TA/backend-config.json.license
+++ b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U65-Default-noTA/backend-config.json.license
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U65-Dedicated_Sram-TA/ethos-u-inference_runner.axf b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U65-Default-noTA/ethos-u-inference_runner.axf
index f881bb8..5ffc70c 100644
--- a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U65-Dedicated_Sram-TA/ethos-u-inference_runner.axf
+++ b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U65-Default-noTA/ethos-u-inference_runner.axf
Binary files differ
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Sram_Only-TA/ethos-u-inference_runner.axf.license b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U65-Default-noTA/ethos-u-inference_runner.axf.license
index 8896f92..8896f92 100644
--- a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U55-Sram_Only-TA/ethos-u-inference_runner.axf.license
+++ b/src/mlia/resources/backends/applications/inference_runner-sse-300-22.08.02-ethos-U65-Default-noTA/ethos-u-inference_runner.axf.license
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Shared_Sram-TA/ethos-u-inference_runner.axf b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Shared_Sram-TA/ethos-u-inference_runner.axf
deleted file mode 100644
index 846ee33..0000000
--- a/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Shared_Sram-TA/ethos-u-inference_runner.axf
+++ /dev/null
Binary files differ
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Sram_Only-TA/backend-config.json.license b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Sram_Only-TA/backend-config.json.license
deleted file mode 100644
index 9b83bfc..0000000
--- a/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Sram_Only-TA/backend-config.json.license
+++ /dev/null
@@ -1,3 +0,0 @@
-SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates.
-
-SPDX-License-Identifier: Apache-2.0
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Sram_Only-TA/ethos-u-inference_runner.axf b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Sram_Only-TA/ethos-u-inference_runner.axf
deleted file mode 100644
index e3eab97..0000000
--- a/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Sram_Only-TA/ethos-u-inference_runner.axf
+++ /dev/null
Binary files differ
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Sram_Only-TA/ethos-u-inference_runner.axf.license b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Sram_Only-TA/ethos-u-inference_runner.axf.license
deleted file mode 100644
index 8896f92..0000000
--- a/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Sram_Only-TA/ethos-u-inference_runner.axf.license
+++ /dev/null
@@ -1,31 +0,0 @@
-SPDX-FileCopyrightText: Copyright 2009-2022, Arm Limited and/or its affiliates.
-SPDX-FileCopyrightText: Copyright (c) 2006, 2008 Junio C Hamano
-SPDX-FileCopyrightText: Copyright 2011, The Dojo Foundation
-SPDX-FileCopyrightText: Copyright (c) 1999-2009 KEIL, 2009-2016 ARM Germany GmbH. All rights reserved.
-SPDX-FileCopyrightText: Copyright (c) 2006, 2007 CodeSourcery Inc
-SPDX-FileCopyrightText: Copyright (c) 2010 "Cowboy" Ben Alman
-SPDX-FileCopyrightText: Copyright 1997-2016 Freescale Semiconductor, Inc.
-SPDX-FileCopyrightText: Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
-SPDX-FileCopyrightText: Copyright 2011, John Resig
-SPDX-FileCopyrightText: Copyright 2016-2021 NXP
-SPDX-FileCopyrightText: Copyright (c) 2012 mbed.org
-SPDX-FileCopyrightText: Copyright (c) 2012-2017 Keil Software. All rights reserved.
-SPDX-FileCopyrightText: Copyright (C) 2009 by Dimitri van Heesch.
-SPDX-FileCopyrightText: Copyright (c) 2017-2021 IAR Systems
-SPDX-FileCopyrightText: Copyright (C) 2003-2008 Greg Valure
-SPDX-FileCopyrightText: Copyright 2015 gRPC authors.
-SPDX-FileCopyrightText: Copyright 2018 Dan Field. All rights reserved.
-SPDX-FileCopyrightText: Copyright 2014 Stefan.Eilemann@epfl.ch
-SPDX-FileCopyrightText: Copyright (c) 2016, the Dart project authors
-SPDX-FileCopyrightText: Copyright 2015 The Chromium Authors
-SPDX-FileCopyrightText: Copyright (C) 2019 Free Software Foundation, Inc.
-SPDX-FileCopyrightText: Copyright (c) 2021, Vasyl Gello.
-SPDX-FileCopyrightText: Copyright 2020 Jan Tojnar
-SPDX-FileCopyrightText: Copyright 2017-2022 The TensorFlow Authors. All Rights Reserved.
-SPDX-FileCopyrightText: Copyright 2014-2022 Google Inc. All rights reserved.
-SPDX-FileCopyrightText: Copyright 2015-2018 The Gemmlowp Authors. All rights reserved.
-SPDX-FileCopyrightText: Copyright (c) 2003-2019, Mark Borgerding. All rights reserved.
-SPDX-FileCopyrightText: Copyright 2019-2022 The Pigweed Authors
-SPDX-FileCopyrightText: Copyright 2019-2021 Google LLC. All Rights Reserved.
-
-SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause and CC-PDDC
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Sram_Only-TA/backend-config.json b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U55-Default-noTA/backend-config.json
index a56e49d..f7ee996 100644
--- a/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Sram_Only-TA/backend-config.json
+++ b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U55-Default-noTA/backend-config.json
@@ -1,6 +1,6 @@
[
{
- "name": "Generic Inference Runner: Ethos-U55 SRAM",
+ "name": "Generic Inference Runner: Ethos-U55",
"description": "This application allows running inferences using custom NN TensorFlow Lite models on Ethos-U. No data pre-/post-processing is executed.",
"supported_systems": [
{
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U65-Dedicated_Sram-TA/backend-config.json.license b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U55-Default-noTA/backend-config.json.license
index 9b83bfc..9b83bfc 100644
--- a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U65-Dedicated_Sram-TA/backend-config.json.license
+++ b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U55-Default-noTA/backend-config.json.license
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U55-Default-noTA/ethos-u-inference_runner.axf b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U55-Default-noTA/ethos-u-inference_runner.axf
new file mode 100644
index 0000000..2e2a574
--- /dev/null
+++ b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U55-Default-noTA/ethos-u-inference_runner.axf
Binary files differ
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U65-Dedicated_Sram-TA/ethos-u-inference_runner.axf.license b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U55-Default-noTA/ethos-u-inference_runner.axf.license
index 8896f92..8896f92 100644
--- a/src/mlia/resources/backends/applications/inference_runner-sse-300-22.05.01-ethos-U65-Dedicated_Sram-TA/ethos-u-inference_runner.axf.license
+++ b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U55-Default-noTA/ethos-u-inference_runner.axf.license
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Shared_Sram-TA/backend-config.json b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U65-Default-noTA/backend-config.json
index 0bdbd27..21d8239 100644
--- a/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Shared_Sram-TA/backend-config.json
+++ b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U65-Default-noTA/backend-config.json
@@ -1,10 +1,10 @@
[
{
- "name": "Generic Inference Runner: Ethos-U55/65 Shared SRAM",
+ "name": "Generic Inference Runner: Ethos-U65",
"description": "This application allows running inferences using custom NN TensorFlow Lite models on Ethos-U. No data pre-/post-processing is executed.",
"supported_systems": [
{
- "name": "Corstone-310: Cortex-M85+Ethos-U55"
+ "name": "Corstone-310: Cortex-M85+Ethos-U65"
}
],
"variables": {
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Shared_Sram-TA/backend-config.json.license b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U65-Default-noTA/backend-config.json.license
index 9b83bfc..9b83bfc 100644
--- a/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Shared_Sram-TA/backend-config.json.license
+++ b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U65-Default-noTA/backend-config.json.license
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U65-Default-noTA/ethos-u-inference_runner.axf b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U65-Default-noTA/ethos-u-inference_runner.axf
new file mode 100644
index 0000000..20dff50
--- /dev/null
+++ b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U65-Default-noTA/ethos-u-inference_runner.axf
Binary files differ
diff --git a/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Shared_Sram-TA/ethos-u-inference_runner.axf.license b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U65-Default-noTA/ethos-u-inference_runner.axf.license
index 8896f92..8896f92 100644
--- a/src/mlia/resources/backends/applications/inference_runner-sse-310-22.05.01-ethos-U55-Shared_Sram-TA/ethos-u-inference_runner.axf.license
+++ b/src/mlia/resources/backends/applications/inference_runner-sse-310-22.08.02-ethos-U65-Default-noTA/ethos-u-inference_runner.axf.license
diff --git a/src/mlia/tools/metadata/corstone.py b/src/mlia/tools/metadata/corstone.py
index 0894207..cea1ec9 100644
--- a/src/mlia/tools/metadata/corstone.py
+++ b/src/mlia/tools/metadata/corstone.py
@@ -382,6 +382,7 @@ def get_corstone_310_installation() -> Installation:
PackagePathChecker(
expected_files=[
"models/Linux64_GCC-9.3/FVP_Corstone_SSE-310",
+ "models/Linux64_GCC-9.3/FVP_Corstone_SSE-310_Ethos-U65",
],
backend_subfolder="models/Linux64_GCC-9.3",
),
@@ -389,6 +390,7 @@ def get_corstone_310_installation() -> Installation:
static_backend_path=Path("/opt/VHT"),
expected_files=[
"VHT_Corstone_SSE-310",
+ "VHT_Corstone_SSE-310_Ethos-U65",
],
copy_source=False,
system_config=(
diff --git a/tests/test_backend_manager.py b/tests/test_backend_manager.py
index c22b4c1..dfbcdaa 100644
--- a/tests/test_backend_manager.py
+++ b/tests/test_backend_manager.py
@@ -389,16 +389,16 @@ class TestBackendRunner:
"device, system, application, backend, expected_error",
[
(
- DeviceInfo(device_type="ethos-u55", mac=32, memory_mode="Shared_Sram"),
+ DeviceInfo(device_type="ethos-u55", mac=32),
("Corstone-300: Cortex-M55+Ethos-U55", True),
- ("Generic Inference Runner: Ethos-U55 SRAM", True),
+ ("Generic Inference Runner: Ethos-U55", True),
"Corstone-300",
does_not_raise(),
),
(
- DeviceInfo(device_type="ethos-u55", mac=32, memory_mode="Shared_Sram"),
+ DeviceInfo(device_type="ethos-u55", mac=32),
("Corstone-300: Cortex-M55+Ethos-U55", False),
- ("Generic Inference Runner: Ethos-U55 SRAM", False),
+ ("Generic Inference Runner: Ethos-U55", False),
"Corstone-300",
pytest.raises(
Exception,
@@ -406,27 +406,27 @@ class TestBackendRunner:
),
),
(
- DeviceInfo(device_type="ethos-u55", mac=32, memory_mode="Shared_Sram"),
+ DeviceInfo(device_type="ethos-u55", mac=32),
("Corstone-300: Cortex-M55+Ethos-U55", True),
- ("Generic Inference Runner: Ethos-U55 SRAM", False),
+ ("Generic Inference Runner: Ethos-U55", False),
"Corstone-300",
pytest.raises(
Exception,
- match=r"Application Generic Inference Runner: Ethos-U55/65 Shared SRAM "
+ match=r"Application Generic Inference Runner: Ethos-U55 "
r"for the system Corstone-300: Cortex-M55\+Ethos-U55 is not installed",
),
),
(
- DeviceInfo(device_type="ethos-u55", mac=32, memory_mode="Shared_Sram"),
+ DeviceInfo(device_type="ethos-u55", mac=32),
("Corstone-310: Cortex-M85+Ethos-U55", True),
- ("Generic Inference Runner: Ethos-U55 SRAM", True),
+ ("Generic Inference Runner: Ethos-U55", True),
"Corstone-310",
does_not_raise(),
),
(
- DeviceInfo(device_type="ethos-u55", mac=32, memory_mode="Shared_Sram"),
+ DeviceInfo(device_type="ethos-u55", mac=32),
("Corstone-310: Cortex-M85+Ethos-U55", False),
- ("Generic Inference Runner: Ethos-U55 SRAM", False),
+ ("Generic Inference Runner: Ethos-U55", False),
"Corstone-310",
pytest.raises(
Exception,
@@ -434,27 +434,27 @@ class TestBackendRunner:
),
),
(
- DeviceInfo(device_type="ethos-u55", mac=32, memory_mode="Shared_Sram"),
+ DeviceInfo(device_type="ethos-u55", mac=32),
("Corstone-310: Cortex-M85+Ethos-U55", True),
- ("Generic Inference Runner: Ethos-U55 SRAM", False),
+ ("Generic Inference Runner: Ethos-U55", False),
"Corstone-310",
pytest.raises(
Exception,
- match=r"Application Generic Inference Runner: Ethos-U55/65 Shared SRAM "
+ match=r"Application Generic Inference Runner: Ethos-U55 "
r"for the system Corstone-310: Cortex-M85\+Ethos-U55 is not installed",
),
),
(
- DeviceInfo(device_type="ethos-u65", mac=512, memory_mode="Shared_Sram"),
+ DeviceInfo(device_type="ethos-u65", mac=512),
("Corstone-300: Cortex-M55+Ethos-U65", True),
- ("Generic Inference Runner: Ethos-U65 Dedicated SRAM", True),
+ ("Generic Inference Runner: Ethos-U65", True),
"Corstone-300",
does_not_raise(),
),
(
- DeviceInfo(device_type="ethos-u65", mac=512, memory_mode="Shared_Sram"),
+ DeviceInfo(device_type="ethos-u65", mac=512),
("Corstone-300: Cortex-M55+Ethos-U65", False),
- ("Generic Inference Runner: Ethos-U65 Dedicated SRAM", False),
+ ("Generic Inference Runner: Ethos-U65", False),
"Corstone-300",
pytest.raises(
Exception,
@@ -462,21 +462,48 @@ class TestBackendRunner:
),
),
(
- DeviceInfo(device_type="ethos-u65", mac=512, memory_mode="Shared_Sram"),
+ DeviceInfo(device_type="ethos-u65", mac=512),
("Corstone-300: Cortex-M55+Ethos-U65", True),
- ("Generic Inference Runner: Ethos-U65 Dedicated SRAM", False),
+ ("Generic Inference Runner: Ethos-U65", False),
"Corstone-300",
pytest.raises(
Exception,
- match=r"Application Generic Inference Runner: Ethos-U55/65 Shared SRAM "
+ match=r"Application Generic Inference Runner: Ethos-U65 "
r"for the system Corstone-300: Cortex-M55\+Ethos-U65 is not installed",
),
),
(
+ DeviceInfo(device_type="ethos-u65", mac=512),
+ ("Corstone-310: Cortex-M85+Ethos-U65", True),
+ ("Generic Inference Runner: Ethos-U65", True),
+ "Corstone-310",
+ does_not_raise(),
+ ),
+ (
+ DeviceInfo(device_type="ethos-u65", mac=512),
+ ("Corstone-310: Cortex-M85+Ethos-U65", False),
+ ("Generic Inference Runner: Ethos-U65", False),
+ "Corstone-310",
+ pytest.raises(
+ Exception,
+ match=r"System Corstone-310: Cortex-M85\+Ethos-U65 is not installed",
+ ),
+ ),
+ (
+ DeviceInfo(device_type="ethos-u65", mac=512),
+ ("Corstone-310: Cortex-M85+Ethos-U65", True),
+ ("Generic Inference Runner: Ethos-U65", False),
+ "Corstone-310",
+ pytest.raises(
+ Exception,
+ match=r"Application Generic Inference Runner: Ethos-U65 "
+ r"for the system Corstone-310: Cortex-M85\+Ethos-U65 is not installed",
+ ),
+ ),
+ (
DeviceInfo(
device_type="unknown_device", # type: ignore
mac=None, # type: ignore
- memory_mode="Shared_Sram",
),
("some_system", False),
("some_application", False),
@@ -561,7 +588,7 @@ def test_estimate_performance_insufficient_data(
with pytest.raises(
Exception, match="Unable to get performance metrics, insufficient data"
):
- device = DeviceInfo(device_type="ethos-u55", mac=32, memory_mode="Shared_Sram")
+ device = DeviceInfo(device_type="ethos-u55", mac=32)
estimate_performance(ModelInfo(test_tflite_model), device, backend)
@@ -579,7 +606,7 @@ def test_estimate_performance_invalid_output(
with pytest.raises(Exception, match="Unable to get performance metrics"):
estimate_performance(
ModelInfo(test_tflite_model),
- DeviceInfo(device_type="ethos-u55", mac=256, memory_mode="Shared_Sram"),
+ DeviceInfo(device_type="ethos-u55", mac=256),
backend=backend,
)
@@ -608,7 +635,7 @@ def create_mock_context(stdout: list[str]) -> ExecutionContext:
@pytest.mark.parametrize("backend", ("Corstone-300", "Corstone-310"))
def test_get_generic_runner(backend: str) -> None:
"""Test function get_generic_runner()."""
- device_info = DeviceInfo("ethos-u55", 256, memory_mode="Shared_Sram")
+ device_info = DeviceInfo("ethos-u55", 256)
runner = get_generic_runner(device_info=device_info, backend=backend)
assert isinstance(runner, GenericInferenceRunnerEthosU)
@@ -643,40 +670,28 @@ class TestGenericInferenceRunnerEthosU:
"device, backend, expected_system, expected_app",
[
[
- DeviceInfo("ethos-u55", 256, memory_mode="Shared_Sram"),
+ DeviceInfo("ethos-u55", 256),
"Corstone-300",
"Corstone-300: Cortex-M55+Ethos-U55",
- "Generic Inference Runner: Ethos-U55/65 Shared SRAM",
+ "Generic Inference Runner: Ethos-U55",
],
[
- DeviceInfo("ethos-u55", 256, memory_mode="Shared_Sram"),
- "Corstone-310",
- "Corstone-310: Cortex-M85+Ethos-U55",
- "Generic Inference Runner: Ethos-U55/65 Shared SRAM",
+ DeviceInfo("ethos-u65", 256),
+ "Corstone-300",
+ "Corstone-300: Cortex-M55+Ethos-U65",
+ "Generic Inference Runner: Ethos-U65",
],
[
- DeviceInfo("ethos-u55", 256, memory_mode="Sram"),
+ DeviceInfo("ethos-u55", 256),
"Corstone-310",
"Corstone-310: Cortex-M85+Ethos-U55",
- "Generic Inference Runner: Ethos-U55 SRAM",
+ "Generic Inference Runner: Ethos-U55",
],
[
- DeviceInfo("ethos-u55", 256, memory_mode="Sram"),
- "Corstone-300",
- "Corstone-300: Cortex-M55+Ethos-U55",
- "Generic Inference Runner: Ethos-U55 SRAM",
- ],
- [
- DeviceInfo("ethos-u65", 256, memory_mode="Shared_Sram"),
- "Corstone-300",
- "Corstone-300: Cortex-M55+Ethos-U65",
- "Generic Inference Runner: Ethos-U55/65 Shared SRAM",
- ],
- [
- DeviceInfo("ethos-u65", 256, memory_mode="Dedicated_Sram"),
- "Corstone-300",
- "Corstone-300: Cortex-M55+Ethos-U65",
- "Generic Inference Runner: Ethos-U65 Dedicated SRAM",
+ DeviceInfo("ethos-u65", 256),
+ "Corstone-310",
+ "Corstone-310: Cortex-M85+Ethos-U65",
+ "Generic Inference Runner: Ethos-U65",
],
],
)
@@ -696,24 +711,7 @@ class TestGenericInferenceRunnerEthosU:
with pytest.raises(
RuntimeError, match="Unsupported device ethos-u65 for backend test_backend"
):
- get_generic_runner(
- DeviceInfo("ethos-u65", 256, memory_mode="Shared_Sram"), "test_backend"
- )
-
- @staticmethod
- def test_artifact_resolver_unsupported_memory_mode() -> None:
- """Test that it should be not possible to use unsupported memory modes."""
- with pytest.raises(
- RuntimeError, match="Unsupported memory mode test_memory_mode"
- ):
- get_generic_runner(
- DeviceInfo(
- "ethos-u65",
- 256,
- memory_mode="test_memory_mode", # type: ignore
- ),
- "Corstone-300",
- )
+ get_generic_runner(DeviceInfo("ethos-u65", 256), "test_backend")
@staticmethod
@pytest.mark.parametrize("backend", ("Corstone-300", "Corstone-310"))
@@ -723,9 +721,7 @@ class TestGenericInferenceRunnerEthosU:
"""Test that inference should fail if system is not installed."""
backend_runner.is_system_installed.return_value = False
- generic_runner = get_generic_runner(
- DeviceInfo("ethos-u55", 256, memory_mode="Shared_Sram"), backend
- )
+ generic_runner = get_generic_runner(DeviceInfo("ethos-u55", 256), backend)
with pytest.raises(
Exception,
match=r"System Corstone-3[01]0: Cortex-M[58]5\+Ethos-U55 is not installed",
@@ -741,12 +737,10 @@ class TestGenericInferenceRunnerEthosU:
backend_runner.is_system_installed.return_value = True
backend_runner.is_application_installed.return_value = False
- generic_runner = get_generic_runner(
- DeviceInfo("ethos-u55", 256, memory_mode="Shared_Sram"), backend
- )
+ generic_runner = get_generic_runner(DeviceInfo("ethos-u55", 256), backend)
with pytest.raises(
Exception,
- match="Application Generic Inference Runner: Ethos-U55/65 Shared SRAM"
+ match="Application Generic Inference Runner: Ethos-U55"
r" for the system Corstone-3[01]0: Cortex-M[58]5\+Ethos-U55 is not "
r"installed",
):
diff --git a/tests/test_tools_metadata_corstone.py b/tests/test_tools_metadata_corstone.py
index bc3f31d..02c04d4 100644
--- a/tests/test_tools_metadata_corstone.py
+++ b/tests/test_tools_metadata_corstone.py
@@ -432,7 +432,13 @@ def test_corstone_300_installer(
"/opt/VHT/VHT_Corstone_SSE-300_Ethos-U65",
},
],
- [get_corstone_310_installation(), {"/opt/VHT/VHT_Corstone_SSE-310"}],
+ [
+ get_corstone_310_installation(),
+ {
+ "/opt/VHT/VHT_Corstone_SSE-310",
+ "/opt/VHT/VHT_Corstone_SSE-310_Ethos-U65",
+ },
+ ],
],
)
def test_corstone_vht_install(