MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / main

Function main

bench/python/perf_utils.py:903–982  ·  view source on GitHub ↗

The main function. This will run the comparison function to compare two benchmarking runs.

()

Source from the content-addressed store, hash-verified

901
902
903def main():
904 """
905 The main function. This will run the comparison function to compare two benchmarking runs.
906 """
907 parser = argparse.ArgumentParser("Summarize and compare benchmarking runs.")
908
909 parser.add_argument(
910 "-o",
911 "--output-dir",
912 type=str,
913 required=True,
914 help="The output directory where you want to store the result summary as a CSV file.",
915 )
916
917 parser.add_argument(
918 "-b",
919 "--baseline-root",
920 type=str,
921 required=True,
922 help="Root folder containing one sub-folder per sample in which benchmark.py styled JSONs"
923 " of the baseline runs of those samples are stored.",
924 )
925 parser.add_argument(
926 "-bn",
927 "--baseline-name",
928 type=str,
929 required=True,
930 help="The name of the column representing the baseline run in the output table.",
931 )
932 parser.add_argument(
933 "-c",
934 "--compare-roots",
935 action="append",
936 required=False,
937 help="Optional. List of folders containing one sub-folder per sample in which benchmark.py"
938 " styled JSONs of the comparison runs of those samples are stored.",
939 )
940 parser.add_argument(
941 "-cn",
942 "--compare-names",
943 action="append",
944 required=False,
945 help="Optional. List of names of the column representing the comparison runs in the "
946 "output table",
947 )
948
949 args = parser.parse_args()
950
951 if not os.path.isdir(args.output_dir):
952 raise ValueError("output-dir does not exist: %s" % args.output_dir)
953
954 if not os.path.isdir(args.baseline_root):
955 raise ValueError("baseline-root does not exist: %s" % args.baseline_json)
956
957 if len(args.compare_roots) != len(args.compare_names):
958 raise ValueError(
959 "Length mismatch between the number of given paths for comparison and"
960 "their run names. %d v/s %d. Each path must have its corresponding run name."

Callers 1

perf_utils.pyFile · 0.70

Calls 2

summarize_runsFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected