| 185 | |
| 186 | |
| 187 | ProgramOptions::ProgramOptions() : m_CxxOptions{"ExecuteNetwork", |
| 188 | "Executes a neural network model using the provided input " |
| 189 | "tensor(s). Prints the resulting output tensor(s).\n" |
| 190 | "\n" |
| 191 | "The Execution Time generated by the Arm NN Core code is a\n" |
| 192 | "more accurate measure of the time taken overall to run the model.\n" |
| 193 | "The Inference Time printed in an Execute Network run is doing\n" |
| 194 | "a crude measurement of overall time to check against a very inexact\n" |
| 195 | "upper threshold and should not be used for performance analysis.\n"} |
| 196 | { |
| 197 | try |
| 198 | { |
| 199 | // cxxopts doesn't provide a mechanism to ensure required options are given. There is a |
| 200 | // separate function CheckRequiredOptions() for that. |
| 201 | m_CxxOptions.add_options("a) Required") |
| 202 | ("c,compute", |
| 203 | "Which device to run layers on by default. If a single device doesn't support all layers in the " |
| 204 | "model you can specify a second or third to fall back on. " |
| 205 | "NOTE: Multiple compute devices need to be passed as a comma separated list without whitespaces " |
| 206 | "e.g. GpuAcc,CpuAcc,CpuRef or by repeating the program option e.g. '-c CpuAcc -c CpuRef'. " |
| 207 | "Duplicates are ignored.\n" |
| 208 | "Possible choices for current machine: [ " |
| 209 | + armnn::BackendRegistryInstance().GetBackendIdsAsString() + " ]", |
| 210 | cxxopts::value<std::vector<std::string>>()) |
| 211 | |
| 212 | ("m,model-path", |
| 213 | "Path to model file, e.g. .armnn, .tflite, .onnx. " |
| 214 | "DEPRECATED: .pb and .prototxt model files no longer loaded and are deprecated." |
| 215 | "DEPRECATED: .onnx model files will no longer loaded from 24.08 onwards.", |
| 216 | cxxopts::value<std::string>(m_ExNetParams.m_ModelPath)); |
| 217 | |
| 218 | m_CxxOptions.add_options("b) Ordering") |
| 219 | ("i,input-name", |
| 220 | "Identifier of the input tensors in the network separated by a comma " |
| 221 | "and is only required for ordering input files", |
| 222 | cxxopts::value<std::string>()) |
| 223 | |
| 224 | ("o,output-name", |
| 225 | "Identifier of the output tensors in the network separated by a comma " |
| 226 | "and is only required for ordering output files.", |
| 227 | cxxopts::value<std::string>()); |
| 228 | |
| 229 | m_CxxOptions.add_options("c) General") |
| 230 | ("b,dynamic-backends-path", |
| 231 | "Path where to load any available dynamic backend from. " |
| 232 | "If left empty (the default), dynamic backends will not be used.", |
| 233 | cxxopts::value<std::string>(m_RuntimeOptions.m_DynamicBackendsPath)) |
| 234 | |
| 235 | ("d,input-tensor-data", |
| 236 | "Path to files containing the input data as a flat array separated by whitespace. " |
| 237 | "Several paths can be passed by separating them with a comma if the network has multiple inputs " |
| 238 | "or you wish to run the model multiple times with different input data using the 'iterations' option. " |
| 239 | "If not specified, the network will be run with dummy data (useful for profiling).", |
| 240 | cxxopts::value<std::string>()->default_value("")) |
| 241 | |
| 242 | ("h,help", "Display usage information") |
| 243 | |
| 244 | ("infer-output-shape", |
nothing calls this directly
no test coverage detected