diff options
author | Colm Donelan <colm.donelan@arm.com> | 2024-03-25 17:54:04 +0000 |
---|---|---|
committer | Colm Donelan <colm.donelan@arm.com> | 2024-03-28 22:09:27 +0000 |
commit | f760c939d45c9e59fc10db8db220d30ecc65adf0 (patch) | |
tree | 634440a53d680f49d690c037309368777b8f7486 /tests/ExecuteNetwork/ArmNNExecutor.cpp | |
parent | a778dc3739e16471597e79987036f4a6c50e537b (diff) | |
download | armnn-f760c939d45c9e59fc10db8db220d30ecc65adf0.tar.gz |
MLCE-1245 Fixing runtime memory handling in delegate and ArmNN executor.
Neither the armnn_delegate nor the ArmNNExecutor unloaded their network
before being destructed. This was leaking significant memory.
Signed-off-by: Colm Donelan <colm.donelan@arm.com>
Change-Id: I61db2e6cbbff4ec4771e86ac71eab90c02389c9e
Diffstat (limited to 'tests/ExecuteNetwork/ArmNNExecutor.cpp')
-rw-r--r-- | tests/ExecuteNetwork/ArmNNExecutor.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/ExecuteNetwork/ArmNNExecutor.cpp b/tests/ExecuteNetwork/ArmNNExecutor.cpp index 58655c1814..121d3fab15 100644 --- a/tests/ExecuteNetwork/ArmNNExecutor.cpp +++ b/tests/ExecuteNetwork/ArmNNExecutor.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2022-2023 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2022-2024 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -89,6 +89,11 @@ ArmNNExecutor::ArmNNExecutor(const ExecuteNetworkParams& params, armnn::IRuntime } } +ArmNNExecutor::~ArmNNExecutor() +{ + m_Runtime->UnloadNetwork(m_NetworkId); +} + void ArmNNExecutor::ExecuteAsync() { #if !defined(ARMNN_DISABLE_THREADS) |