IVGCVSW-5685 Add CpuAcc specific configuration option numberOfThreads
* Added ability to set number of threads used in CpuAcc backend
* Enabled number-of-threads option in ExecuteNetwork
* Added TfLiteDelegate ModelOptions test
* Added unsigned int type to BackendOptions.hpp
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: Ia576d4f45cbe5df3654bc730bb5ebd5181d82b5a
diff --git a/tests/InferenceModel.hpp b/tests/InferenceModel.hpp
index 936d0bf..d20bb22 100644
--- a/tests/InferenceModel.hpp
+++ b/tests/InferenceModel.hpp
@@ -99,6 +99,7 @@
bool m_EnableFastMath;
bool m_SaveCachedNetwork;
std::string m_CachedNetworkFilePath;
+ unsigned int m_NumberOfThreads;
Params()
: m_ComputeDevices{}
@@ -113,6 +114,7 @@
, m_EnableFastMath(false)
, m_SaveCachedNetwork(false)
, m_CachedNetworkFilePath("")
+ , m_NumberOfThreads(0)
{}
};
@@ -436,7 +438,8 @@
});
armnn::BackendOptions cpuAcc("CpuAcc",
{
- { "FastMathEnabled", params.m_EnableFastMath }
+ { "FastMathEnabled", params.m_EnableFastMath },
+ { "NumberOfThreads", params.m_NumberOfThreads }
});
options.m_ModelOptions.push_back(gpuAcc);
options.m_ModelOptions.push_back(cpuAcc);