| 43 | }; |
| 44 | |
| 45 | TestOptions ParseTfliteKernelTestFlags(int* argc, char** argv) { |
| 46 | TestOptions options; |
| 47 | std::vector<tensorflow::Flag> flags = { |
| 48 | tensorflow::Flag("tflite_model", &options.tflite_model, |
| 49 | "Path of tensorflow lite model."), |
| 50 | tensorflow::Flag("read_input_from_file", &options.read_input_from_file, |
| 51 | "File to read input data from. If empty, generates " |
| 52 | "input at runtime."), |
| 53 | tensorflow::Flag("dump_input_to_file", &options.dump_input_to_file, |
| 54 | "File to dump randomly generated input."), |
| 55 | tensorflow::Flag("dump_output_to_file", &options.dump_output_to_file, |
| 56 | "File to dump output."), |
| 57 | tensorflow::Flag("input_distribution", &options.input_distribution, |
| 58 | "Input distribution. Default: Gaussian."), |
| 59 | tensorflow::Flag("kernel_type", &options.kernel_type, "Kernel type."), |
| 60 | }; |
| 61 | |
| 62 | tensorflow::Flags::Parse(argc, argv, flags); |
| 63 | |
| 64 | return options; |
| 65 | } |
| 66 | |
| 67 | TfLiteStatus RunKernelTest(const kernel_test::TestOptions& options, |
| 68 | TestRunner* runner) { |