| 120 | } // namespace |
| 121 | |
| 122 | void ShowHelp(const char* exe, const CliOptionsConfig& config) |
| 123 | { |
| 124 | std::cerr << "Usage: " << exe << " [ARGS]\n\n" |
| 125 | << "Arguments:\n"; |
| 126 | |
| 127 | for (const auto optionId : config.optionIds) { |
| 128 | const auto& spec = GetCliOptionSpec(optionId); |
| 129 | std::cerr << spec.helpText; |
| 130 | |
| 131 | #if defined(ETHOS_U_NPU_ENABLED) |
| 132 | if (optionId == CliOptionId::kDevice) { |
| 133 | std::cerr << " Default: " << RunnerOptions::kDefaultDevice << ".\n"; |
| 134 | } else if (optionId == CliOptionId::kTimeout) { |
| 135 | std::cerr << " Default: " << RunnerOptions::kDefaultTimeout << ".\n"; |
| 136 | } |
| 137 | #endif |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | bool ParseCliOptions(int argc, char* argv[], RunnerOptions& options, const CliOptionsConfig& config) |
| 142 | { |
no outgoing calls
no test coverage detected