IVGCVSW-3816 Make compute option required in ExecuteNetwork
authorMatthew Jackson <matthew.jackson@arm.com>
Thu, 5 Sep 2019 14:55:55 +0000 (15:55 +0100)
committerMatthew Jackson <matthew.jackson@arm.com>
Fri, 6 Sep 2019 12:09:30 +0000 (12:09 +0000)
Signed-off-by: Matthew Jackson <matthew.jackson@arm.com>
Change-Id: If13b731d95c79e3e296d7dfc6c1ac94bf3a93ff3

tests/ExecuteNetwork/ExecuteNetwork.cpp

index 828d249..d97a199 100644 (file)
@@ -34,7 +34,7 @@ int main(int argc, const char* argv[])
 
     size_t subgraphId = 0;
 
-    const std::string backendsMessage = "Which device to run layers on by default. Possible choices: "
+    const std::string backendsMessage = "REQUIRED: Which device to run layers on by default. Possible choices: "
                                       + armnn::BackendRegistryInstance().GetBackendIdsAsString();
 
     po::options_description desc("Options");
@@ -42,6 +42,8 @@ int main(int argc, const char* argv[])
     {
         desc.add_options()
             ("help", "Display usage information")
+            ("compute,c", po::value<std::vector<std::string>>()->multitoken()->required(),
+             backendsMessage.c_str())
             ("test-cases,t", po::value(&testCasesFile), "Path to a CSV file containing test cases to run. "
              "If set, further parameters -- with the exception of compute device and concurrency -- will be ignored, "
              "as they are expected to be defined in the file for each test in particular.")
@@ -52,8 +54,6 @@ int main(int argc, const char* argv[])
              "tensorflow-text.")
             ("model-path,m", po::value(&modelPath)->required(), "Path to model file, e.g. .armnn, .caffemodel, "
              ".prototxt, .tflite, .onnx")
-            ("compute,c", po::value<std::vector<std::string>>()->multitoken(),
-             backendsMessage.c_str())
             ("dynamic-backends-path,b", po::value(&dynamicBackendsPath),
              "Path where to load any available dynamic backend from. "
              "If left empty (the default), dynamic backends will not be used.")