MCPcopy Create free account
hub / github.com/XiaoMi/mace / parse_args

Function parse_args

tools/python/run_target.py:77–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75
76
77def parse_args():
78 parser = argparse.ArgumentParser()
79 parser.add_argument(
80 "--target_abi",
81 type=str,
82 default="armeabi-v7a",
83 help="Target ABI: host, armeabi-v7a, arm64-v8a,"
84 " arm-linux-gnueabihf, aarch64-linux-gnu"
85 )
86 parser.add_argument(
87 "--target_socs",
88 type=str,
89 default="all",
90 help="serialno for adb connection,"
91 " username@ip for arm linux,"
92 " host for host"
93 " | all | random"
94 )
95 parser.add_argument(
96 "--device_conf",
97 type=str,
98 default="",
99 help="device yaml config path"
100 )
101 parser.add_argument(
102 "--target_name",
103 type=str,
104 default="mace_cc_benchmark",
105 help="Target name: mace_cc_benchmark, mace_cc_test, mace_run"
106 )
107 parser.add_argument(
108 "--build_dir",
109 type=str,
110 default="build/cmake-build",
111 help="cmake build dir"
112 )
113 parser.add_argument(
114 "--build",
115 action="store_true",
116 help="if build before run"
117 )
118
119 parser.add_argument("--envs", type=str, default="",
120 help="Environment vars: "
121 " MACE_CPP_MIN_VLOG_LEVEL=2,"
122 " MACE_OUT_OF_RANGE_CHECK=1, "
123 " MACE_OPENCL_PROFILING=1,"
124 " MACE_INTERNAL_STORAGE_PATH=/path/to,"
125 " LD_PRELOAD=/path/to")
126
127 flgs, args = parser.parse_known_args()
128 return flgs, args
129
130
131if __name__ == "__main__":

Callers 1

run_target.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected