Skip to content

Commit

Permalink
Do not benchmark small problem sizes (#1243)
Browse files Browse the repository at this point in the history
  • Loading branch information
gevtushenko authored Dec 27, 2023
1 parent 2165845 commit 3a91dd2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions benchmarks/scripts/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,21 @@ def elapsed_time_looks_good(x):
return False


def problem_size_looks_large_enough(elements):
def get_largest_problem_size(rt_values):
# Small problem sizes do not utilize entire GPU.
# Benchmarking small problem sizes in environments where we do not control
# distributions comparison, e.g. CI, is not useful because of stability issues.
return elements.isdigit() and int(elements) > 20

elements = []
for element in rt_values:
if element.isdigit():
elements.append(int(element))
return [str(max(elements))]

def filter_runtime_workloads_for_ci(rt_values):
for subbench in rt_values:
for axis in rt_values[subbench]:
if axis.startswith('Elements') and axis.endswith('[pow2]'):
rt_values[subbench][axis] = list(filter(problem_size_looks_large_enough, rt_values[subbench][axis]))
rt_values[subbench][axis] = get_largest_problem_size(rt_values[subbench][axis])

return rt_values

Expand Down

0 comments on commit 3a91dd2

Please sign in to comment.