aboutsummaryrefslogtreecommitdiff
path: root/tests/test_target_ethos_u_data_analysis.py
diff options
context:
space:
mode:
authorNathan Bailey <nathan.bailey@arm.com>2024-01-26 14:19:52 +0000
committerNathan Bailey <nathan.bailey@arm.com>2024-02-23 15:23:06 +0000
commite506c7bd0453cb204ec7a59267fe3982492aaed6 (patch)
tree225b70ede952e6dfe0b33fcc3813106bb8828e33 /tests/test_target_ethos_u_data_analysis.py
parentd10b53a358d7fddc2e5a818d146b71bc5bb5e0ed (diff)
downloadmlia-e506c7bd0453cb204ec7a59267fe3982492aaed6.tar.gz
refactor: Migrate from Vela's internal code to CSV summary
Removes vela defines from vela compiler.py and performance.py Replaces calls to vela code with data from vela summary csv Resolves: MLIA-1024 Signed-off-by: Nathan Bailey <nathan.bailey@arm.com> Change-Id: I569878f2936767f70c0255919ca40d1969275529
Diffstat (limited to 'tests/test_target_ethos_u_data_analysis.py')
-rw-r--r--tests/test_target_ethos_u_data_analysis.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/test_target_ethos_u_data_analysis.py b/tests/test_target_ethos_u_data_analysis.py
index 3cddf10..0add7c2 100644
--- a/tests/test_target_ethos_u_data_analysis.py
+++ b/tests/test_target_ethos_u_data_analysis.py
@@ -98,7 +98,7 @@ def test_perf_metrics_diff() -> None:
cast(EthosUConfiguration, profile("ethos-u55-256")),
NPUCycles(1, 2, 3, 4, 5, 6),
# memory metrics are in kilobytes
- MemoryUsage(*[i * 1024 for i in range(1, 6)]), # type: ignore
+ MemoryUsage(*list(range(1, 5))), # type: ignore
LayerwisePerfInfo(layerwise_info=[]),
),
[
@@ -110,9 +110,7 @@ def test_perf_metrics_diff() -> None:
cast(EthosUConfiguration, profile("ethos-u55-256")),
NPUCycles(1, 2, 3, 4, 5, 6),
# memory metrics are in kilobytes
- MemoryUsage(
- *[i * 1024 for i in range(1, 6)] # type: ignore
- ),
+ MemoryUsage(*list(range(1, 5))), # type: ignore
LayerwisePerfInfo(layerwise_info=[]),
),
],
@@ -128,8 +126,8 @@ def test_perf_metrics_diff() -> None:
opt_diffs={
"sram": PerfMetricDiff(1.0, 1.0),
"dram": PerfMetricDiff(2.0, 2.0),
- "on_chip_flash": PerfMetricDiff(4.0, 4.0),
- "off_chip_flash": PerfMetricDiff(5.0, 5.0),
+ "on_chip_flash": PerfMetricDiff(3.0, 3.0),
+ "off_chip_flash": PerfMetricDiff(4.0, 4.0),
"npu_total_cycles": PerfMetricDiff(3, 3),
},
)
@@ -143,7 +141,7 @@ def test_perf_metrics_diff() -> None:
cast(EthosUConfiguration, profile("ethos-u55-256")),
NPUCycles(1, 2, 3, 4, 5, 6),
# memory metrics are in kilobytes
- MemoryUsage(*[i * 1024 for i in range(1, 6)]), # type: ignore
+ MemoryUsage(*list(range(1, 5))), # type: ignore
LayerwisePerfInfo(layerwise_info=[]),
),
[],