()
| 55 | |
| 56 | |
| 57 | def main(): |
| 58 | global FLAGS |
| 59 | parser = argparse.ArgumentParser( |
| 60 | description="Invoke toco using protos as input.") |
| 61 | parser.add_argument( |
| 62 | "model_proto_file", |
| 63 | type=str, |
| 64 | help="File containing serialized proto that describes the model.") |
| 65 | parser.add_argument( |
| 66 | "toco_proto_file", |
| 67 | type=str, |
| 68 | help="File containing serialized proto describing how TOCO should run.") |
| 69 | parser.add_argument( |
| 70 | "model_input_file", type=str, help="Input model is read from this file.") |
| 71 | parser.add_argument( |
| 72 | "model_output_file", |
| 73 | type=str, |
| 74 | help="Result of applying TOCO conversion is written here.") |
| 75 | parser.add_argument( |
| 76 | "--debug_proto_file", |
| 77 | type=str, |
| 78 | default="", |
| 79 | help=("File containing serialized `GraphDebugInfo` proto that describes " |
| 80 | "logging information.")) |
| 81 | parser.add_argument( |
| 82 | "--enable_mlir_converter", |
| 83 | action="store_true", |
| 84 | help=("Boolean indiciating whether to enable the MLIR converter instead " |
| 85 | "of TOCO converter. (default False)")) |
| 86 | |
| 87 | FLAGS, unparsed = parser.parse_known_args() |
| 88 | |
| 89 | app.run(main=execute, argv=[sys.argv[0]] + unparsed) |
| 90 | |
| 91 | |
| 92 | if __name__ == "__main__": |
no test coverage detected