| 301 | |
| 302 | |
| 303 | def parse_args(): |
| 304 | parser = argparse.ArgumentParser() |
| 305 | parser.add_argument( |
| 306 | "--config", |
| 307 | type=str, |
| 308 | default="", |
| 309 | help="yaml conf path" |
| 310 | ) |
| 311 | parser.add_argument( |
| 312 | '--devices_to_run', |
| 313 | type=str, |
| 314 | default="", |
| 315 | help="devices you want to run") |
| 316 | parser.add_argument( |
| 317 | "--model_name", |
| 318 | type=str, |
| 319 | default="", |
| 320 | help="model name in yaml conf" |
| 321 | ) |
| 322 | parser.add_argument( |
| 323 | "--target_abi", |
| 324 | type=str, |
| 325 | default="arm64-v8a", |
| 326 | help="Target ABI: host, armeabi-v7a, arm64-v8a," |
| 327 | " arm-linux-gnueabihf, aarch64-linux-gnu" |
| 328 | ) |
| 329 | parser.add_argument( |
| 330 | "--target_socs", |
| 331 | type=str, |
| 332 | default="all", |
| 333 | help="serialno for adb connection," |
| 334 | " username@ip for arm linux," |
| 335 | " host for host" |
| 336 | " | all | random" |
| 337 | ) |
| 338 | parser.add_argument( |
| 339 | "--device_conf", |
| 340 | type=str, |
| 341 | default="", |
| 342 | help="device yaml config path" |
| 343 | ) |
| 344 | parser.add_argument( |
| 345 | "--runtime", |
| 346 | type=str, |
| 347 | default="", |
| 348 | help="cpu/gpu/dsp/hta/apu" |
| 349 | ) |
| 350 | parser.add_argument("--envs", type=str, default="", |
| 351 | help="Environment vars: " |
| 352 | " MACE_OUT_OF_RANGE_CHECK=1, " |
| 353 | " MACE_OPENCL_PROFILING=1," |
| 354 | " MACE_INTERNAL_STORAGE_PATH=/path/to," |
| 355 | " LD_PRELOAD=/path/to") |
| 356 | parser.add_argument( |
| 357 | "--validate", |
| 358 | action="store_true", |
| 359 | help="enable validate" |
| 360 | ) |