MLECO-763: fixes to PyArmNN failing unit tests
authorNina Drozd <nina.drozd@arm.com>
Tue, 5 May 2020 11:16:06 +0000 (12:16 +0100)
committerNina Drozd <nina.drozd@arm.com>
Tue, 5 May 2020 13:31:53 +0000 (13:31 +0000)
Change-Id: Iac17cb6cd2136d5fd2f213561402f700329ac6c2
Signed-off-by: Nina Drozd <nina.drozd@arm.com>
python/pyarmnn/test/test_profiling_utilities.py

index b7b91b5..9fb7fd8 100644 (file)
@@ -24,7 +24,9 @@ def mock_profiler(shared_data_folder):
 
 
 def test_inference_exec(mock_profiler):
-    profiling_data_obj = ann.get_profiling_data(mock_profiler)
+    preferred_backends = [ann.BackendId('CpuRef'), ann.BackendId('CpuAcc'),
+                          ann.BackendId('GpuAcc'), ann.BackendId('EthosNAcc')]
+    profiling_data_obj = ann.get_profiling_data(mock_profiler, preferred_backends)
 
     assert (len(profiling_data_obj.inference_data) > 0)
     assert (len(profiling_data_obj.per_workload_execution_data) > 0)
@@ -60,7 +62,9 @@ def test_inference_exec(mock_profiler):
                                                                   'EthosNSomeMock4dWorkload_Execute_#8')
                                                                  ])
 def test_profiler_workloads(mock_profiler, exec_times, unit, backend, workload):
-    profiling_data_obj = ann.get_profiling_data(mock_profiler)
+    preferred_backends = [ann.BackendId('CpuRef'), ann.BackendId('CpuAcc'),
+                          ann.BackendId('GpuAcc'), ann.BackendId('EthosNAcc')]
+    profiling_data_obj = ann.get_profiling_data(mock_profiler, preferred_backends)
 
     work_load_exec = profiling_data_obj.per_workload_execution_data[workload]
     assert work_load_exec["execution_time"] == exec_times