IVGCVSW-5685 Add CpuAcc specific configuration option numberOfThreads
* Added --number-of-threads command line option to android-nn-driver
!armnn:5068
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: I248326bf3c0355a7a17b70cb1aac7b7976820c12
diff --git a/DriverOptions.cpp b/DriverOptions.cpp
index c30a440..3f9b76e 100644
--- a/DriverOptions.cpp
+++ b/DriverOptions.cpp
@@ -38,6 +38,7 @@
, m_FastMathEnabled(false)
, m_ShouldExit(false)
, m_SaveCachedNetwork(false)
+ , m_NumberOfThreads(0)
{
}
@@ -51,6 +52,7 @@
, m_FastMathEnabled(false)
, m_ShouldExit(false)
, m_SaveCachedNetwork(false)
+ , m_NumberOfThreads(0)
{
}
@@ -63,6 +65,7 @@
, m_FastMathEnabled(false)
, m_ShouldExit(false)
, m_SaveCachedNetwork(false)
+ , m_NumberOfThreads(0)
{
std::string unsupportedOperationsAsString;
std::string clTunedParametersModeAsString;
@@ -127,6 +130,12 @@
" See also --cached-network-file",
cxxopts::value<bool>(m_SaveCachedNetwork)->default_value("false"))
+ ("number-of-threads",
+ "Assign the number of threads used by the CpuAcc backend. "
+ "Input value must be between 1 and 64. "
+ "Default is set to 0 (Backend will decide number of threads to use).",
+ cxxopts::value<unsigned int>(m_NumberOfThreads)->default_value("0"))
+
("t,cl-tuned-parameters-file",
"If non-empty, the given file will be used to load/save CL tuned parameters. "
"See also --cl-tuned-parameters-mode",