(func, inps, reps, unpack_inps, is_mge)
| 415 | |
| 416 | |
| 417 | def get_avg_time(func, inps, reps, unpack_inps, is_mge): |
| 418 | # warm up |
| 419 | for _ in range(2): |
| 420 | t = perf_func(func, inps, reps, unpack_inps, is_mge) |
| 421 | |
| 422 | times = [] |
| 423 | for _ in range(5): |
| 424 | t = perf_func(func, inps, reps, unpack_inps, is_mge) |
| 425 | times.append(t) |
| 426 | return np.mean(times) |
| 427 | |
| 428 | |
| 429 | def get_perf_results(mge_func, torch_func, shapes, unpack_inps, reps): |
no test coverage detected