aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorColm Donelan <colm.donelan@arm.com>2023-02-06 15:01:57 +0000
committerColm Donelan <colm.donelan@arm.com>2023-02-06 15:02:07 +0000
commit35a06893c0f7115b6274720569cf0b5398bff2e5 (patch)
tree299003b5bcc163ddcd483d37db853a187fa37863 /tests
parent4c231de93b9b7c2af24e155550cb80b96f2c4bb5 (diff)
downloadarmnn-35a06893c0f7115b6274720569cf0b5398bff2e5.tar.gz
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 <colm.donelan@arm.com> Change-Id: Iaab3d4ef277c47e1ff82a51ba2648f5f51ec3e2c
Diffstat (limited to 'tests')
-rw-r--r--tests/ExecuteNetwork/ExecuteNetwork.cpp2
-rw-r--r--tests/ExecuteNetwork/TfliteExecutor.cpp6
-rw-r--r--tests/ExecuteNetwork/TfliteExecutor.hpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/ExecuteNetwork/ExecuteNetwork.cpp b/tests/ExecuteNetwork/ExecuteNetwork.cpp
index a70f33ff23..14841ec1e9 100644
--- a/tests/ExecuteNetwork/ExecuteNetwork.cpp
+++ b/tests/ExecuteNetwork/ExecuteNetwork.cpp
@@ -17,7 +17,7 @@ std::unique_ptr<IExecutor> BuildExecutor(ProgramOptions& programOptions)
programOptions.m_ExNetParams.m_TfLiteExecutor == ExecuteNetworkParams::TfLiteExecutor::TfliteInterpreter)
{
#if defined(ARMNN_TFLITE_DELEGATE)
- return std::make_unique<TfLiteExecutor>(programOptions.m_ExNetParams);
+ return std::make_unique<TfLiteExecutor>(programOptions.m_ExNetParams, programOptions.m_RuntimeOptions);
#else
ARMNN_LOG(fatal) << "Not built with Arm NN Tensorflow-Lite delegate support.";
return nullptr;
diff --git a/tests/ExecuteNetwork/TfliteExecutor.cpp b/tests/ExecuteNetwork/TfliteExecutor.cpp
index f01abfccd7..fc9c21a559 100644
--- a/tests/ExecuteNetwork/TfliteExecutor.cpp
+++ b/tests/ExecuteNetwork/TfliteExecutor.cpp
@@ -6,7 +6,8 @@
#include "TfliteExecutor.hpp"
#include "tensorflow/lite/kernels/kernel_util.h"
-TfLiteExecutor::TfLiteExecutor(const ExecuteNetworkParams& params) : m_Params(params)
+TfLiteExecutor::TfLiteExecutor(const ExecuteNetworkParams& params, armnn::IRuntime::CreationOptions runtimeOptions)
+ : m_Params(params)
{
m_Model = tflite::FlatBufferModel::BuildFromFile(m_Params.m_ModelPath.c_str());
if (!m_Model)
@@ -26,8 +27,7 @@ TfLiteExecutor::TfLiteExecutor(const ExecuteNetworkParams& params) : m_Params(pa
// Create the Armnn Delegate
// Populate a DelegateOptions from the ExecuteNetworkParams.
armnnDelegate::DelegateOptions delegateOptions = m_Params.ToDelegateOptions();
- delegateOptions.SetExternalProfilingParams(delegateOptions.GetExternalProfilingParams());
-
+ delegateOptions.SetRuntimeOptions(runtimeOptions);
std::unique_ptr<TfLiteDelegate, decltype(&armnnDelegate::TfLiteArmnnDelegateDelete)>
theArmnnDelegate(armnnDelegate::TfLiteArmnnDelegateCreate(delegateOptions),
armnnDelegate::TfLiteArmnnDelegateDelete);
diff --git a/tests/ExecuteNetwork/TfliteExecutor.hpp b/tests/ExecuteNetwork/TfliteExecutor.hpp
index 623d6357eb..5101ac0182 100644
--- a/tests/ExecuteNetwork/TfliteExecutor.hpp
+++ b/tests/ExecuteNetwork/TfliteExecutor.hpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2022-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#pragma once
@@ -21,7 +21,7 @@ using namespace tflite;
class TfLiteExecutor : public IExecutor
{
public:
- TfLiteExecutor(const ExecuteNetworkParams& m_Params);
+ TfLiteExecutor(const ExecuteNetworkParams& m_Params, armnn::IRuntime::CreationOptions runtimeOptions);
std::vector<const void*> Execute() override;
void PrintNetworkInfo() override{};