IVGCVSW-2928 Fix issue with GPU profiling
Correctly enable GPU profiling when test profiling is enabled.
Remove extra copy of the profiling-enabled flag from InferenceModel::Params
and correctly pass around the copy that is in InferenceTestOptions.
!referencetests:180329
Change-Id: I0daa1bab2e7068fc479bf417a553183b1d922166
Signed-off-by: Matthew Bentham <matthew.bentham@arm.com>
diff --git a/tests/InferenceModel.hpp b/tests/InferenceModel.hpp
index e168923..cb6daef 100644
--- a/tests/InferenceModel.hpp
+++ b/tests/InferenceModel.hpp
@@ -87,7 +87,6 @@
std::vector<armnn::TensorShape> m_InputShapes;
std::vector<std::string> m_OutputBindings;
std::vector<armnn::BackendId> m_ComputeDevices;
- bool m_EnableProfiling;
size_t m_SubgraphId;
bool m_IsModelBinary;
bool m_VisualizePostOptimizationModel;
@@ -95,7 +94,6 @@
Params()
: m_ComputeDevices{"CpuRef"}
- , m_EnableProfiling(false)
, m_SubgraphId(0)
, m_IsModelBinary(true)
, m_VisualizePostOptimizationModel(false)
@@ -428,8 +426,10 @@
"to FP16 where the backend supports it.");
}
- InferenceModel(const Params& params, const std::shared_ptr<armnn::IRuntime>& runtime = nullptr)
- : m_EnableProfiling(params.m_EnableProfiling)
+ InferenceModel(const Params& params,
+ bool enableProfiling,
+ const std::shared_ptr<armnn::IRuntime>& runtime = nullptr)
+ : m_EnableProfiling(enableProfiling)
{
if (runtime)
{