aboutsummaryrefslogtreecommitdiff
path: root/tests/InferenceModel.hpp
diff options
context:
space:
mode:
authorKeith Davis <keith.davis@arm.com>2021-08-18 17:14:05 +0100
committerNikhil Raj Arm <nikhil.raj@arm.com>2021-08-20 09:10:22 +0000
commit4914d0c1f4cbb01fe276a7093af4cff13270b74a (patch)
treece6c4364bb596803148833af535215aa6ab6de90 /tests/InferenceModel.hpp
parente369dbddae66c58f4b444c4b25871c10af19ed9d (diff)
downloadarmnn-4914d0c1f4cbb01fe276a7093af4cff13270b74a.tar.gz
IVGCVSW-6249 Add ProfilingDetails Macros to all workloads in Ref, Neon, CL
* Add functionality to only output network details in ExNet Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I0c45e67193f308ce7b86f1bb1a918a266fefba2e
Diffstat (limited to 'tests/InferenceModel.hpp')
-rw-r--r--tests/InferenceModel.hpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/InferenceModel.hpp b/tests/InferenceModel.hpp
index 1db287f453..b982df396d 100644
--- a/tests/InferenceModel.hpp
+++ b/tests/InferenceModel.hpp
@@ -101,6 +101,7 @@ struct Params
bool m_EnableFastMath;
bool m_SaveCachedNetwork;
bool m_OutputDetailsToStdOut;
+ bool m_OutputDetailsOnlyToStdOut;
std::string m_CachedNetworkFilePath;
unsigned int m_NumberOfThreads;
std::string m_MLGOTuningFilePath;
@@ -121,6 +122,7 @@ struct Params
, m_EnableFastMath(false)
, m_SaveCachedNetwork(false)
, m_OutputDetailsToStdOut(false)
+ , m_OutputDetailsOnlyToStdOut(false)
, m_CachedNetworkFilePath("")
, m_NumberOfThreads(0)
, m_MLGOTuningFilePath("")
@@ -406,7 +408,8 @@ public:
bool enableProfiling,
const std::string& dynamicBackendsPath,
const std::shared_ptr<armnn::IRuntime>& runtime = nullptr)
- : m_EnableProfiling(enableProfiling)
+ : m_EnableProfiling(enableProfiling),
+ m_ProfilingDetailsMethod(armnn::ProfilingDetailsMethod::Undefined)
, m_DynamicBackendsPath(dynamicBackendsPath)
{
if (runtime)
@@ -421,6 +424,12 @@ public:
m_Runtime = armnn::IRuntime::Create(options);
}
+ // Configure the Profiler if the the profiling details are opted for
+ if (params.m_OutputDetailsOnlyToStdOut)
+ m_ProfilingDetailsMethod = armnn::ProfilingDetailsMethod::DetailsOnly;
+ else if (params.m_OutputDetailsToStdOut)
+ m_ProfilingDetailsMethod = armnn::ProfilingDetailsMethod::DetailsWithEvents;
+
std::string invalidBackends;
if (!CheckRequestedBackendsAreValid(params.m_ComputeDevices, armnn::Optional<std::string&>(invalidBackends)))
{
@@ -492,7 +501,7 @@ public:
armnn::MemorySource::Undefined,
armnn::MemorySource::Undefined,
enableProfiling,
- params.m_OutputDetailsToStdOut);
+ m_ProfilingDetailsMethod);
std::string errorMessage;
ret = m_Runtime->LoadNetwork(m_NetworkIdentifier, std::move(optNet), errorMessage, networkProperties);
@@ -744,6 +753,7 @@ private:
std::vector<armnn::BindingPointInfo> m_InputBindings;
std::vector<armnn::BindingPointInfo> m_OutputBindings;
bool m_EnableProfiling;
+ armnn::ProfilingDetailsMethod m_ProfilingDetailsMethod;
std::string m_DynamicBackendsPath;
template<typename TContainer>