[FRONTEND] fix AutoTuner error when OutOfResources (#1208)

Minor bug: AutoTuner currently throws the following error when certain
configs go OutOfResources (e.g. the matmul example when testing on GPUs
with less shared memory).
This commit is contained in:
Arun A. Kumar
2023-02-18 07:29:33 +00:00
committed by GitHub
parent 4d067f5120
commit 35d1c062b8

View File

@@ -62,9 +62,9 @@ class Autotuner(KernelInterface):
self.hook(args)
self.fn.run(*args, num_warps=config.num_warps, num_stages=config.num_stages, **current)
try:
return do_bench(kernel_call)
return do_bench(kernel_call, percentiles=(0.5, 0.2, 0.8))
except OutOfResources:
return float('inf')
return (float('inf'), float('inf'), float('inf'))
def run(self, *args, **kwargs):
self.nargs = dict(zip(self.arg_names, args))