IVGCVSW-5686 Add GpuAcc MLGO tuning file configuration argument to nnapi

Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Change-Id: I15ca7db703065b0c70766a18b1a9a213834f39e0
diff --git a/1.2/ArmnnDriverImpl.cpp b/1.2/ArmnnDriverImpl.cpp
index d35826e..ccf82d0 100644
--- a/1.2/ArmnnDriverImpl.cpp
+++ b/1.2/ArmnnDriverImpl.cpp
@@ -139,8 +139,10 @@
     {
         { "FastMathEnabled", options.IsFastMathEnabled() },
         { "SaveCachedNetwork", options.SaveCachedNetwork() },
-        { "CachedNetworkFilePath", options.GetCachedNetworkFilePath() }
+        { "CachedNetworkFilePath", options.GetCachedNetworkFilePath() },
+        { "MLGOTuningFilePath", options.GetClMLGOTunedParametersFile() }
     });
+
     armnn::BackendOptions cpuAcc("CpuAcc",
     {
         { "FastMathEnabled", options.IsFastMathEnabled() },
diff --git a/1.3/ArmnnDriverImpl.cpp b/1.3/ArmnnDriverImpl.cpp
index 6a69765..6d8fbe6 100644
--- a/1.3/ArmnnDriverImpl.cpp
+++ b/1.3/ArmnnDriverImpl.cpp
@@ -150,8 +150,10 @@
     {
         { "FastMathEnabled", options.IsFastMathEnabled() },
         { "SaveCachedNetwork", options.SaveCachedNetwork() },
-        { "CachedNetworkFilePath", options.GetCachedNetworkFilePath() }
+        { "CachedNetworkFilePath", options.GetCachedNetworkFilePath() },
+        { "MLGOTuningFilePath", options.GetClMLGOTunedParametersFile() }
     });
+
     armnn::BackendOptions cpuAcc("CpuAcc",
     {
         { "FastMathEnabled", options.IsFastMathEnabled() },
diff --git a/ArmnnDriverImpl.cpp b/ArmnnDriverImpl.cpp
index 5ce88da..3e4aab3 100644
--- a/ArmnnDriverImpl.cpp
+++ b/ArmnnDriverImpl.cpp
@@ -114,8 +114,11 @@
     {
         { "FastMathEnabled", options.IsFastMathEnabled() },
         { "SaveCachedNetwork", options.SaveCachedNetwork() },
-        { "CachedNetworkFilePath", options.GetCachedNetworkFilePath() }
+        { "CachedNetworkFilePath", options.GetCachedNetworkFilePath() },
+        { "MLGOTuningFilePath", options.GetClMLGOTunedParametersFile() }
+
     });
+
     armnn::BackendOptions cpuAcc("CpuAcc",
     {
         { "FastMathEnabled", options.IsFastMathEnabled() },
diff --git a/DriverOptions.cpp b/DriverOptions.cpp
index 3f9b76e..42f7ea9 100644
--- a/DriverOptions.cpp
+++ b/DriverOptions.cpp
@@ -106,6 +106,10 @@
          "the file accordingly.",
          cxxopts::value<std::string>(clTunedParametersModeAsString)->default_value("UseTunedParameters"))
 
+        ("g,mlgo-cl-tuned-parameters-file",
+        "If non-empty, the given file will be used to load/save MLGO CL tuned parameters. ",
+        cxxopts::value<std::string>(m_ClMLGOTunedParametersFile)->default_value(""))
+
         ("n,service-name",
          "If non-empty, the driver service name to be registered",
          cxxopts::value<std::string>(m_ServiceName)->default_value("armnn"))
diff --git a/DriverOptions.hpp b/DriverOptions.hpp
index bab611a..8b3f574 100644
--- a/DriverOptions.hpp
+++ b/DriverOptions.hpp
@@ -28,6 +28,7 @@
     const std::string& GetServiceName() const { return m_ServiceName; }
     const std::set<unsigned int>& GetForcedUnsupportedOperations() const { return m_ForcedUnsupportedOperations; }
     const std::string& GetClTunedParametersFile() const { return m_ClTunedParametersFile; }
+    const std::string& GetClMLGOTunedParametersFile() const { return m_ClMLGOTunedParametersFile; }
     armnn::IGpuAccTunedParameters::Mode GetClTunedParametersMode() const { return m_ClTunedParametersMode; }
     armnn::IGpuAccTunedParameters::TuningLevel GetClTuningLevel() const { return m_ClTuningLevel; }
     bool IsGpuProfilingEnabled() const { return m_EnableGpuProfiling; }
@@ -47,6 +48,7 @@
     std::string m_ServiceName;
     std::set<unsigned int> m_ForcedUnsupportedOperations;
     std::string m_ClTunedParametersFile;
+    std::string m_ClMLGOTunedParametersFile;
     armnn::IGpuAccTunedParameters::Mode m_ClTunedParametersMode;
     armnn::IGpuAccTunedParameters::TuningLevel m_ClTuningLevel;
     bool m_EnableGpuProfiling;