()
| 1236 | |
| 1237 | |
| 1238 | def main(): |
| 1239 | parser = argparse.ArgumentParser( |
| 1240 | "Performance benchmarking script for CV-CUDA.", |
| 1241 | formatter_class=argparse.ArgumentDefaultsHelpFormatter, |
| 1242 | ) |
| 1243 | |
| 1244 | parser.add_argument( |
| 1245 | "-np", |
| 1246 | "--num_processes", |
| 1247 | type=int, |
| 1248 | default=1, |
| 1249 | help="The number of processes to spawn.", |
| 1250 | ) |
| 1251 | |
| 1252 | parser.add_argument( |
| 1253 | "-ng", "--num_gpus", type=int, default=1, help="The number of GPUs to use." |
| 1254 | ) |
| 1255 | |
| 1256 | parser.add_argument( |
| 1257 | "-go", |
| 1258 | "--gpu_offset_id", |
| 1259 | type=int, |
| 1260 | default=0, |
| 1261 | help="Offset for the GPU ids, assuming the GPUs are stacked together in a multi-GPU node.", |
| 1262 | ) |
| 1263 | |
| 1264 | parser.add_argument( |
| 1265 | "-ll", |
| 1266 | "--log_level", |
| 1267 | type=str, |
| 1268 | choices=["info", "error", "debug", "warning"], |
| 1269 | default="info", |
| 1270 | help="Sets the desired logging level. Affects the std-out printed by the " |
| 1271 | "sample when it is run.", |
| 1272 | ) |
| 1273 | |
| 1274 | parser.add_argument( |
| 1275 | "-o", |
| 1276 | "--output_dir", |
| 1277 | default="/tmp", |
| 1278 | type=str, |
| 1279 | help="The folder where the output results should be stored.", |
| 1280 | ) |
| 1281 | |
| 1282 | parser.add_argument( |
| 1283 | "-w", |
| 1284 | "--warmup_batches", |
| 1285 | type=int, |
| 1286 | default=1, |
| 1287 | help="Sets the number of batches that should be ignored from being counted in " |
| 1288 | "the totals of the performance benchmarking numbers. These many batches are ignored" |
| 1289 | " from the front and the end.", |
| 1290 | ) |
| 1291 | |
| 1292 | parser.add_argument( |
| 1293 | "-m", |
| 1294 | "--maximize_clocks", |
| 1295 | action="store_true", |
no test coverage detected