MCPcopy Create free account
hub / github.com/pytorch/executorch / _get_args

Function _get_args

backends/arm/scripts/aot_arm_compiler.py:536–711  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

534
535
536def _get_args():
537 parser = argparse.ArgumentParser()
538 parser.add_argument(
539 "-m",
540 "--model_name",
541 required=True,
542 help=f"Model file .py/.pth/.pt or a model from examples/models. Valid names: {set(MODEL_NAME_TO_MODEL.keys())}",
543 )
544 parser.add_argument(
545 "--model_input",
546 required=False,
547 default=None,
548 help="Provide model input .pt file, or python variable name",
549 )
550 parser.add_argument(
551 "-d",
552 "--delegate",
553 action="store_true",
554 required=False,
555 default=False,
556 help="Flag for producing ArmBackend delegated model",
557 )
558 parser.add_argument(
559 "--bundleio",
560 action="store_true",
561 required=False,
562 default=False,
563 help="Flag for producing BundleIO bpte file with input/output test/ref data.",
564 )
565 parser.add_argument(
566 "--etrecord",
567 action="store_true",
568 required=False,
569 default=False,
570 help="Flag for producing a etrecord file.",
571 )
572 parser.add_argument(
573 "-t",
574 "--target",
575 action="store",
576 required=False,
577 default="ethos-u55-128",
578 choices=TARGETS,
579 help=f"Target backend. For delegated models: Ethos-U/VGF/TOSA variants. For non-delegated: cortex-m<variant> (CMSIS-NN portable kernels). Valid targets: {TARGETS}",
580 )
581 # TODO: Remove --evaluate and --evaluate_config completely after a suitable time.
582 # They are deprecated and no longer functional in this script.
583 parser.add_argument(
584 "-e",
585 "--evaluate",
586 required=False,
587 nargs="?",
588 const="generic",
589 choices=["generic", "mv2", "deit_tiny", "resnet18"],
590 help=argparse.SUPPRESS,
591 )
592 parser.add_argument(
593 "-c",

Callers 1

mainFunction · 0.70

Calls 2

keysMethod · 0.80
infoMethod · 0.80

Tested by

no test coverage detected