aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSadik Armagan <sadik.armagan@arm.com>2021-04-27 10:02:10 +0100
committerSadik Armagan <sadik.armagan@arm.com>2021-04-29 08:46:09 +0000
commita04a9d7c11f28c7e932435535e80223782f369f2 (patch)
tree9c1e86b0b4878dad12a359e60a8d2e8e051d2def /src
parent484d5ebb00c0db76efd76a601b5bbaa460cd2ccb (diff)
downloadarmnn-a04a9d7c11f28c7e932435535e80223782f369f2.tar.gz
IVGCVSW-5775 'Add Async Support to ExecuteNetwork'
* Enabled async mode with '-n, concurrent' and 'simultaneous-iterations' in ExecuteNetwork * Number of input files provided should be equal to number of input files provided multiply by number of simultaneous iterations divided by comma !armnn:5443 Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Ibeb318010430bf4ae61a02b18b1bf88f3657774c
Diffstat (limited to 'src')
-rw-r--r--src/armnn/WorkingMemHandle.cpp3
-rw-r--r--src/armnn/WorkingMemHandle.hpp6
-rw-r--r--src/backends/reference/workloads/RefDetectionPostProcessWorkload.cpp8
3 files changed, 12 insertions, 5 deletions
diff --git a/src/armnn/WorkingMemHandle.cpp b/src/armnn/WorkingMemHandle.cpp
index 0cbef82e83..b54c5baddd 100644
--- a/src/armnn/WorkingMemHandle.cpp
+++ b/src/armnn/WorkingMemHandle.cpp
@@ -26,7 +26,8 @@ WorkingMemHandle::WorkingMemHandle(
m_MemoryManagers(memoryManagers),
m_OwnedTensorHandles(std::move(ownedTensorHandles)),
m_IsAllocated(false),
- m_Mutex()
+ m_Mutex(),
+ m_InferenceId(profiling::ProfilingService::GetNextGuid())
{
}
diff --git a/src/armnn/WorkingMemHandle.hpp b/src/armnn/WorkingMemHandle.hpp
index 92b0acaec3..5ccb2b2342 100644
--- a/src/armnn/WorkingMemHandle.hpp
+++ b/src/armnn/WorkingMemHandle.hpp
@@ -38,6 +38,11 @@ public:
return m_NetworkId;
}
+ profiling::ProfilingGuid GetInferenceId() override
+ {
+ return m_InferenceId;
+ }
+
/// Allocate the backing memory required for execution. If this is not called, then allocation will be
/// deferred to execution time. The mutex must be locked.
void Allocate() override;
@@ -87,6 +92,7 @@ private:
bool m_IsAllocated;
std::mutex m_Mutex;
+ profiling::ProfilingGuid m_InferenceId;
};
} // end experimental namespace
diff --git a/src/backends/reference/workloads/RefDetectionPostProcessWorkload.cpp b/src/backends/reference/workloads/RefDetectionPostProcessWorkload.cpp
index 25c326ad37..6784e21585 100644
--- a/src/backends/reference/workloads/RefDetectionPostProcessWorkload.cpp
+++ b/src/backends/reference/workloads/RefDetectionPostProcessWorkload.cpp
@@ -46,10 +46,10 @@ void RefDetectionPostProcessWorkload::Execute(std::vector<ITensorHandle*> inputs
auto scores = MakeDecoder<float>(scoresInfo, inputs[1]->Map());
auto anchors = MakeDecoder<float>(anchorsInfo, m_Anchors->Map(false));
- float* detectionBoxes = GetOutputTensorData<float>(0, m_Data);
- float* detectionClasses = GetOutputTensorData<float>(1, m_Data);
- float* detectionScores = GetOutputTensorData<float>(2, m_Data);
- float* numDetections = GetOutputTensorData<float>(3, m_Data);
+ float* detectionBoxes = reinterpret_cast<float*>(outputs[0]->Map());
+ float* detectionClasses = reinterpret_cast<float*>(outputs[1]->Map());
+ float* detectionScores = reinterpret_cast<float*>(outputs[2]->Map());
+ float* numDetections = reinterpret_cast<float*>(outputs[3]->Map());
DetectionPostProcess(boxEncodingsInfo, scoresInfo, anchorsInfo,
detectionBoxesInfo, detectionClassesInfo,