Skip to content

Commit

Permalink
[Benchmarks] add SubmitKernel run with MeasureCompletion=1
Browse files Browse the repository at this point in the history
  • Loading branch information
igchor committed Dec 12, 2024
1 parent a03da6d commit 6eba5c9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/benchmarks/benches/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ def benchmarks(self) -> list[Benchmark]:

if options.ur is not None:
benches += [
SubmitKernelUR(self, 0),
SubmitKernelUR(self, 1),
SubmitKernelUR(self, 0, 0),
SubmitKernelUR(self, 1, 0),
SubmitKernelUR(self, 1, 1),
]

return benches
Expand Down Expand Up @@ -177,13 +178,14 @@ def bin_args(self) -> list[str]:
]

class SubmitKernelUR(ComputeBenchmark):
def __init__(self, bench, ioq):
def __init__(self, bench, ioq, measureCompletion):
self.ioq = ioq
self.measureCompletion = measureCompletion
super().__init__(bench, "api_overhead_benchmark_ur", "SubmitKernel")

def name(self):
order = "in order" if self.ioq else "out of order"
return f"api_overhead_benchmark_ur SubmitKernel {order}"
return f"api_overhead_benchmark_ur SubmitKernel {order}" + (" with measure completion" if self.measureCompletion else "")

def explicit_group(self):
return "SubmitKernel"
Expand All @@ -192,7 +194,7 @@ def bin_args(self) -> list[str]:
return [
f"--Ioq={self.ioq}",
"--DiscardEvents=0",
"--MeasureCompletion=0",
f"--MeasureCompletion={self.measureCompletion}",
"--iterations=100000",
"--Profiling=0",
"--NumKernels=10",
Expand Down

0 comments on commit 6eba5c9

Please sign in to comment.