diff options
Diffstat (limited to 'tests/ExecuteNetwork')
-rw-r--r-- | tests/ExecuteNetwork/ExecuteNetwork.cpp | 2 | ||||
-rw-r--r-- | tests/ExecuteNetwork/TfliteExecutor.cpp | 6 | ||||
-rw-r--r-- | tests/ExecuteNetwork/TfliteExecutor.hpp | 4 |
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{}; |