(f, a, b)
| 17 | |
| 18 | |
| 19 | def bench(f, a, b): |
| 20 | for i in range(N_warmup): |
| 21 | f(a, b) |
| 22 | torch.mps.synchronize() |
| 23 | |
| 24 | s = time.perf_counter_ns() |
| 25 | for i in range(N_iter_bench): |
| 26 | f(a, b) |
| 27 | e = time.perf_counter_ns() |
| 28 | return (e - s) * 1e-9 |
| 29 | |
| 30 | |
| 31 | def make_mx_conv_1D(strides=1, padding=0, groups=1): |
no test coverage detected