triton.testing.do_bench_cudagraph
- triton.testing.do_bench_cudagraph(fn, rep=20, grad_to_none=None, quantiles=None, return_mode='mean')
对所提供函数的运行时间进行基准测试。
- 参数:
fn (Callable) – 要进行基准测试的函数
rep (int) – 重复次数(以毫秒为单位)
grad_to_none (torch.tensor, optional) – 将所提供张量的梯度重置为 None
return_mode (str) – 要返回的统计指标。选项包括 “min”、“max”、“mean”、“median” 或 “all”。默认为 “mean”。