diff options
author | Mike Kelly <mike.kelly@arm.com> | 2023-01-20 15:51:05 +0000 |
---|---|---|
committer | mike.kelly <mike.kelly@arm.com> | 2023-01-24 14:46:18 +0000 |
commit | 5446a4d6d02002515fc58fafe33d74ae6dca5787 (patch) | |
tree | db731d6a74c4603c43c95214370c82c816d274ee /tests/ExecuteNetwork/ArmNNExecutor.cpp | |
parent | 2542a267dc3dfe2b9148b3944977a6864ef3c558 (diff) | |
download | armnn-5446a4d6d02002515fc58fafe33d74ae6dca5787.tar.gz |
IVGCVSW-7297 When creating multiple Executors only the last
one works fine
* All ArmNNExecutors now share a single IRuntime.
* All armnn_delegates now share a single IRuntime.
* Increased delegate major version.
Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Change-Id: I95cbdc32655ec0beb476dbb2d60f1a0209df8f04
Diffstat (limited to 'tests/ExecuteNetwork/ArmNNExecutor.cpp')
-rw-r--r-- | tests/ExecuteNetwork/ArmNNExecutor.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/ExecuteNetwork/ArmNNExecutor.cpp b/tests/ExecuteNetwork/ArmNNExecutor.cpp index 139da5f830..730c072836 100644 --- a/tests/ExecuteNetwork/ArmNNExecutor.cpp +++ b/tests/ExecuteNetwork/ArmNNExecutor.cpp @@ -19,7 +19,10 @@ ArmNNExecutor::ArmNNExecutor(const ExecuteNetworkParams& params, armnn::IRuntime { runtimeOptions.m_EnableGpuProfiling = params.m_EnableProfiling; runtimeOptions.m_DynamicBackendsPath = params.m_DynamicBackendsPath; - m_Runtime = armnn::IRuntime::Create(runtimeOptions); + + // Create/Get the static ArmNN Runtime. Note that the m_Runtime will be shared by all ArmNNExecutor + // instances so the RuntimeOptions cannot be altered for different ArmNNExecutor instances. + m_Runtime = GetRuntime(runtimeOptions); auto parser = CreateParser(); auto network = parser->CreateNetwork(m_Params); @@ -100,7 +103,7 @@ void ArmNNExecutor::ExecuteAsync() } threadpool = std::make_unique<armnn::Threadpool>(m_Params.m_ThreadPoolSize, - m_Runtime.get(), + m_Runtime, memHandles); ARMNN_LOG(info) << "Asynchronous Execution with Arm NN thread pool... \n"; |