This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def do_bench(fn, warmup=25, rep=100, grad_to_none=None, quantiles=None, return_mode="mean"): | |
| """ | |
| Benchmark the runtime of the provided function. By default, return the median runtime of :code:`fn` along with | |
| the 20-th and 80-th performance percentile. | |
| :param fn: Function to benchmark | |
| :type fn: Callable | |
| :param warmup: Warmup time (in ms) | |
| :type warmup: int | |
| :param rep: Repetition time (in ms) |