IVGCVSW-5485 'Add CacheLoadedNetwork options to Android NN Driver'
* Added Flatbuffers dependency to android-nn-driver
* Added CacheLoadedNetwork options to android-nn-driver
Options will be android.hardware.neuralnetworks@1.3-service-armnn -v -c GpuAcc -n arm-armnn -s -q <file_path> &
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: I2cdf0b84062cb1c6ad4346cd64b00161cfe85920
diff --git a/DriverOptions.cpp b/DriverOptions.cpp
index 6f777e3..c30a440 100644
--- a/DriverOptions.cpp
+++ b/DriverOptions.cpp
@@ -36,6 +36,8 @@
, m_EnableGpuProfiling(false)
, m_fp16Enabled(fp16Enabled)
, m_FastMathEnabled(false)
+ , m_ShouldExit(false)
+ , m_SaveCachedNetwork(false)
{
}
@@ -47,6 +49,8 @@
, m_EnableGpuProfiling(false)
, m_fp16Enabled(fp16Enabled)
, m_FastMathEnabled(false)
+ , m_ShouldExit(false)
+ , m_SaveCachedNetwork(false)
{
}
@@ -58,6 +62,7 @@
, m_fp16Enabled(false)
, m_FastMathEnabled(false)
, m_ShouldExit(false)
+ , m_SaveCachedNetwork(false)
{
std::string unsupportedOperationsAsString;
std::string clTunedParametersModeAsString;
@@ -112,6 +117,16 @@
("p,gpu-profiling", "Turns GPU profiling on",
cxxopts::value<bool>(m_EnableGpuProfiling)->default_value("false"))
+ ("q,cached-network-file", "If non-empty, the given file will be used to load/save cached network. "
+ "If save-cached-network option is given will save the cached network to given file."
+ "If save-cached-network option is not given will load the cached network from given "
+ "file.",
+ cxxopts::value<std::string>(m_CachedNetworkFilePath)->default_value(""))
+
+ ("s,save-cached-network", "Enables saving the cached network to the file given with cached-network-file option."
+ " See also --cached-network-file",
+ cxxopts::value<bool>(m_SaveCachedNetwork)->default_value("false"))
+
("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",