We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 160a81f commit 5b6a0beCopy full SHA for 5b6a0be
kernel_tuner/util.py
@@ -444,6 +444,8 @@ def get_instance_string(params):
444
445
def get_interval(a: list):
446
"""Checks if an array can be an interval. Returns (start, end, step) if interval, otherwise None."""
447
+ if len(a) < 3:
448
+ return None
449
if not all(isinstance(e, (int, float)) for e in a):
450
return None
451
a_min = min(a)
@@ -456,7 +458,10 @@ def get_interval(a: list):
456
458
for i, e in enumerate(a):
457
459
if e-a[i-1] != step:
460
- return (a_min, a_max, step)
461
+ result = (a_min, a_max, step)
462
+ if not all(isinstance(e, (int, float)) for e in result):
463
464
+ return result
465
466
467
def get_kernel_string(kernel_source, params=None):
0 commit comments