diff options
author | Colm Donelan <colm.donelan@arm.com> | 2024-03-05 14:38:53 +0000 |
---|---|---|
committer | Colm Donelan <colm.donelan@arm.com> | 2024-03-06 12:15:02 +0000 |
commit | e4ccada2ed349f22cf75c4b8d8d6ba9dc3990694 (patch) | |
tree | 8d08d7ebc143cf166401c8613fe5672b7f04c6d5 | |
parent | 9fcb405925228d23fc3373135492d5bc885722e0 (diff) | |
download | armnn-e4ccada2ed349f22cf75c4b8d8d6ba9dc3990694.tar.gz |
IVGCVSW-7761 Highlight invalid use of asynchronous and TfLite executor.
In Execute Network the Tflite runtime execution does not support an
asynchronous mode. Inform the user if they have specified an
asynchronous parameter and TfLite executor.
Signed-off-by: Colm Donelan <colm.donelan@arm.com>
Change-Id: I9c5ecb91954c2293a013d110555ecff4aabbfc23
-rw-r--r-- | tests/ExecuteNetwork/ExecuteNetworkProgramOptions.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/ExecuteNetwork/ExecuteNetworkProgramOptions.cpp b/tests/ExecuteNetwork/ExecuteNetworkProgramOptions.cpp index 72c414aa0e..5c1337f769 100644 --- a/tests/ExecuteNetwork/ExecuteNetworkProgramOptions.cpp +++ b/tests/ExecuteNetwork/ExecuteNetworkProgramOptions.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 // @@ -585,10 +585,19 @@ void ProgramOptions::ParseOptions(int ac, const char* av[]) m_ExNetParams.m_ThreadPoolSize = 1; } + // There's an odd combination of parameters to be handled here. It appears that setting m_ThreadPoolSize greater + // than 0 implies using the asynchronous mode. However, TfLite executor does not support an asynchronous mode of + // execution if (m_ExNetParams.m_ThreadPoolSize > 0) { m_ExNetParams.m_Concurrent = true; } + if (m_ExNetParams.m_Concurrent && + m_ExNetParams.m_TfLiteExecutor == ExecuteNetworkParams::TfLiteExecutor::TfliteInterpreter) + { + ARMNN_LOG(info) << "The TfLite runtime does not support an asynchronous mode of execution. Parameters " + "\"n,concurrent\" or \"P, thread-pool-size\" will be ignored."; + } // Parse input tensor shape from the string we got from the command-line. std::vector<std::string> inputTensorShapesVector = |