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/YoloInferenceTest.hpp b/tests/YoloInferenceTest.hpp
index 922bcb8..eb6b227 100644
--- a/tests/YoloInferenceTest.hpp
+++ b/tests/YoloInferenceTest.hpp
@@ -194,14 +194,14 @@
Model::AddCommandLineOptions(options, m_ModelCommandLineOptions);
}
- virtual bool ProcessCommandLineOptions() override
+ virtual bool ProcessCommandLineOptions(const InferenceTestOptions &commonOptions) override
{
if (!ValidateDirectory(m_DataDir))
{
return false;
}
- m_Model = m_ConstructModel(m_ModelCommandLineOptions);
+ m_Model = m_ConstructModel(commonOptions, m_ModelCommandLineOptions);
if (!m_Model)
{
return false;
@@ -229,7 +229,8 @@
private:
typename Model::CommandLineOptions m_ModelCommandLineOptions;
- std::function<std::unique_ptr<Model>(typename Model::CommandLineOptions)> m_ConstructModel;
+ std::function<std::unique_ptr<Model>(const InferenceTestOptions&,
+ typename Model::CommandLineOptions)> m_ConstructModel;
std::unique_ptr<Model> m_Model;
std::string m_DataDir;