From a25886e0966a6b9433cd23595688fadb88a161b2 Mon Sep 17 00:00:00 2001 From: Sadik Armagan Date: Tue, 15 Sep 2020 17:17:08 +0100 Subject: IVGCVSW-5317 'Add enable_fast_math Option to ExecuteNetwork' Signed-off-by: Sadik Armagan Change-Id: I4eb3e27837aea926593d49f9ccea07bab8388d5b --- tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'tests/NetworkExecutionUtils') diff --git a/tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp b/tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp index 74f02d71cb..b5652df37f 100644 --- a/tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp +++ b/tests/NetworkExecutionUtils/NetworkExecutionUtils.hpp @@ -377,6 +377,7 @@ struct ExecuteNetworkParams bool m_GenerateTensorData; bool m_ParseUnsupported = false; bool m_InferOutputShape = false; + bool m_EnableFastMath = false; }; template @@ -400,6 +401,7 @@ int MainImpl(const ExecuteNetworkParams& params, inferenceModelParams.m_VisualizePostOptimizationModel = params.m_EnableLayerDetails; inferenceModelParams.m_ParseUnsupported = params.m_ParseUnsupported; inferenceModelParams.m_InferOutputShape = params.m_InferOutputShape; + inferenceModelParams.m_EnableFastMath = params.m_EnableFastMath; for(const std::string& inputName: params.m_InputNames) { @@ -554,6 +556,7 @@ int RunTest(const std::string& format, bool enableLayerDetails = false, bool parseUnsupported = false, bool inferOutputShape = false, + bool enableFastMath = false, const size_t iterations = 1, const std::shared_ptr& runtime = nullptr) { @@ -683,6 +686,7 @@ int RunTest(const std::string& format, params.m_GenerateTensorData = inputTensorDataFilePathsVector.empty(); params.m_ParseUnsupported = parseUnsupported; params.m_InferOutputShape = inferOutputShape; + params.m_EnableFastMath = enableFastMath; // Warn if ExecuteNetwork will generate dummy input data if (params.m_GenerateTensorData) @@ -754,7 +758,7 @@ int RunTest(const std::string& format, int RunCsvTest(const armnnUtils::CsvRow &csvRow, const std::shared_ptr& runtime, const bool enableProfiling, const bool enableFp16TurboMode, const bool enableBf16TurboMode, const double& thresholdTime, const bool printIntermediate, bool enableLayerDetails = false, - bool parseUnuspported = false, bool inferOutputShape = false) + bool parseUnuspported = false, bool inferOutputShape = false, bool enableFastMath = false) { IgnoreUnused(runtime); std::string modelFormat; @@ -875,7 +879,7 @@ int RunCsvTest(const armnnUtils::CsvRow &csvRow, const std::shared_ptr