MCPcopy Create free account
hub / github.com/pytorch/pytorch / GetArgumentParser

Function GetArgumentParser

caffe2/python/convnet_benchmarks.py:643–704  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

641
642
643def GetArgumentParser():
644 parser = argparse.ArgumentParser(description="Caffe2 benchmark.")
645 parser.add_argument(
646 "--batch_size",
647 type=int,
648 default=128,
649 help="The batch size."
650 )
651 parser.add_argument("--model", type=str, help="The model to benchmark.")
652 parser.add_argument(
653 "--order",
654 type=str,
655 default="NCHW",
656 help="The order to evaluate."
657 )
658 parser.add_argument(
659 "--cudnn_ws",
660 type=int,
661 help="The cudnn workspace size."
662 )
663 parser.add_argument(
664 "--iterations",
665 type=int,
666 default=10,
667 help="Number of iterations to run the network."
668 )
669 parser.add_argument(
670 "--warmup_iterations",
671 type=int,
672 default=10,
673 help="Number of warm-up iterations before benchmarking."
674 )
675 parser.add_argument(
676 "--forward_only",
677 action='store_true',
678 help="If set, only run the forward pass."
679 )
680 parser.add_argument(
681 "--layer_wise_benchmark",
682 action='store_true',
683 help="If True, run the layer-wise benchmark as well."
684 )
685 parser.add_argument(
686 "--cpu",
687 action='store_true',
688 help="If True, run testing on CPU instead of GPU."
689 )
690 parser.add_argument(
691 "--engine",
692 type=str,
693 default="",
694 help="If set, blindly prefer the given engine(s) for every op.")
695 parser.add_argument(
696 "--dump_model",
697 action='store_true',
698 help="If True, dump the model prototxts to disk."
699 )
700 parser.add_argument("--net_type", type=str, default="dag")

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…