| 374 | } |
| 375 | |
| 376 | int main(int argc, char** argv) |
| 377 | { |
| 378 | samplesCommon::Args args; |
| 379 | bool argsOK = samplesCommon::parseArgs(args, argc, argv); |
| 380 | if (!argsOK) |
| 381 | { |
| 382 | sample::gLogError << "Invalid arguments" << std::endl; |
| 383 | printHelpInfo(); |
| 384 | return EXIT_FAILURE; |
| 385 | } |
| 386 | if (args.help) |
| 387 | { |
| 388 | printHelpInfo(); |
| 389 | return EXIT_SUCCESS; |
| 390 | } |
| 391 | |
| 392 | auto sampleTest = sample::gLogger.defineTest(gSampleName, argc, argv); |
| 393 | |
| 394 | sample::gLogger.reportTestStart(sampleTest); |
| 395 | |
| 396 | SampleOnnxMNIST sample(initializeSampleParams(args)); |
| 397 | |
| 398 | sample::gLogInfo << "Building and running a GPU inference engine for Onnx MNIST" << std::endl; |
| 399 | |
| 400 | if (!sample.build()) |
| 401 | { |
| 402 | return sample::gLogger.reportFail(sampleTest); |
| 403 | } |
| 404 | if (!sample.infer()) |
| 405 | { |
| 406 | return sample::gLogger.reportFail(sampleTest); |
| 407 | } |
| 408 | |
| 409 | return sample::gLogger.reportPass(sampleTest); |
| 410 | } |
nothing calls this directly
no test coverage detected