From 35a06893c0f7115b6274720569cf0b5398bff2e5 Mon Sep 17 00:00:00 2001 From: Colm Donelan Date: Mon, 6 Feb 2023 15:01:57 +0000 Subject: IVGCVSW-7476 Remove ProfilingOptions from DelegateOptions. ProfilingOptions is not used in DelegateOptions. Instead the parameters are passed in through the RuntimeOptions. This is done in ExecuteNetwork and TfliteExecutor. Signed-off-by: Colm Donelan Change-Id: Iaab3d4ef277c47e1ff82a51ba2648f5f51ec3e2c --- delegate/include/DelegateOptions.hpp | 18 ++---------------- delegate/src/DelegateOptions.cpp | 33 ++++++++++++++++----------------- 2 files changed, 18 insertions(+), 33 deletions(-) (limited to 'delegate') diff --git a/delegate/include/DelegateOptions.hpp b/delegate/include/DelegateOptions.hpp index 4f157db73b..a3c1edf82f 100644 --- a/delegate/include/DelegateOptions.hpp +++ b/delegate/include/DelegateOptions.hpp @@ -1,17 +1,13 @@ // -// Copyright © 2020 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2020-2023 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // #pragma once #include -#include #include -#include - -#include #include #include @@ -247,13 +243,6 @@ public: bool GetInternalProfilingState() const { return m_InternalProfilingEnabled; } const armnn::ProfilingDetailsMethod& GetInternalProfilingDetail() const { return m_InternalProfilingDetail; } - void SetExternalProfilingParams( - const arm::pipe::ProfilingOptions& externalProfilingParams) - { m_ProfilingOptions = externalProfilingParams; } - - const arm::pipe::ProfilingOptions& GetExternalProfilingParams() const - { return m_ProfilingOptions; } - void SetSerializeToDot(const std::string& serializeToDotFile) { m_SerializeToDot = serializeToDotFile; } const std::string& GetSerializeToDot() const { return m_SerializeToDot; } @@ -291,10 +280,7 @@ private: /// Options for the optimization step for the network armnn::OptimizerOptions m_OptimizerOptions; - /// External profiling options. - arm::pipe::ProfilingOptions m_ProfilingOptions; - - /// Internal profiling options. + /// Internal profiling options. Written to INetworkProperties during model load. /// Indicates whether internal profiling is enabled or not. bool m_InternalProfilingEnabled = false; /// Sets the level of detail output by the profiling. Options are DetailsWithEvents = 1 and DetailsOnly = 2 diff --git a/delegate/src/DelegateOptions.cpp b/delegate/src/DelegateOptions.cpp index bb1edab009..fc4858fa29 100644 --- a/delegate/src/DelegateOptions.cpp +++ b/delegate/src/DelegateOptions.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2020 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2020-2023 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -59,7 +59,6 @@ DelegateOptions::DelegateOptions(char const* const* options_keys, armnn::OptimizerOptions optimizerOptions; bool internalProfilingState = false; armnn::ProfilingDetailsMethod internalProfilingDetail = armnn::ProfilingDetailsMethod::DetailsWithEvents; - arm::pipe::ProfilingOptions extProfilingParams; for (size_t i = 0; i < num_options; ++i) { // Process backends @@ -200,39 +199,40 @@ DelegateOptions::DelegateOptions(char const* const* options_keys, // Process enable-external-profiling else if (std::string(options_keys[i]) == std::string("enable-external-profiling")) { - extProfilingParams.m_EnableProfiling = armnn::stringUtils::StringToBool(options_values[i]); + runtimeOptions.m_ProfilingOptions.m_EnableProfiling = + armnn::stringUtils::StringToBool(options_values[i]); } - // Process timeline-profiling + // Process timeline-profiling else if (std::string(options_keys[i]) == std::string("timeline-profiling")) { - extProfilingParams.m_TimelineEnabled = armnn::stringUtils::StringToBool(options_values[i]); + runtimeOptions.m_ProfilingOptions.m_TimelineEnabled = armnn::stringUtils::StringToBool(options_values[i]); } - // Process outgoing-capture-file + // Process outgoing-capture-file else if (std::string(options_keys[i]) == std::string("outgoing-capture-file")) { - extProfilingParams.m_OutgoingCaptureFile = options_values[i]; + runtimeOptions.m_ProfilingOptions.m_OutgoingCaptureFile = options_values[i]; } - // Process incoming-capture-file + // Process incoming-capture-file else if (std::string(options_keys[i]) == std::string("incoming-capture-file")) { - extProfilingParams.m_IncomingCaptureFile = options_values[i]; + runtimeOptions.m_ProfilingOptions.m_IncomingCaptureFile = options_values[i]; } - // Process file-only-external-profiling + // Process file-only-external-profiling else if (std::string(options_keys[i]) == std::string("file-only-external-profiling")) { - extProfilingParams.m_FileOnly = armnn::stringUtils::StringToBool(options_values[i]); + runtimeOptions.m_ProfilingOptions.m_FileOnly = armnn::stringUtils::StringToBool(options_values[i]); } - // Process counter-capture-period + // Process counter-capture-period else if (std::string(options_keys[i]) == std::string("counter-capture-period")) { - extProfilingParams.m_CapturePeriod = static_cast(std::stoul(options_values[i])); + runtimeOptions.m_ProfilingOptions.m_CapturePeriod = static_cast(std::stoul(options_values[i])); } - // Process profiling-file-format + // Process profiling-file-format else if (std::string(options_keys[i]) == std::string("profiling-file-format")) { - extProfilingParams.m_FileFormat = options_values[i]; + runtimeOptions.m_ProfilingOptions.m_FileFormat = options_values[i]; } - // Process serialize-to-dot + // Process serialize-to-dot else if (std::string(options_keys[i]) == std::string("serialize-to-dot")) { this->SetSerializeToDot(options_values[i]); @@ -252,6 +252,5 @@ DelegateOptions::DelegateOptions(char const* const* options_keys, this->SetRuntimeOptions(runtimeOptions); this->SetOptimizerOptions(optimizerOptions); this->SetInternalProfilingParams(internalProfilingState, internalProfilingDetail); - this->SetExternalProfilingParams(extProfilingParams); } } // namespace armnnDelegate -- cgit v1.2.1