Skip to content

Commit 18e5291

Browse files
committed
add ulls compute benchmarks
1 parent 066f5a6 commit 18e5291

File tree

2 files changed

+63
-14
lines changed

2 files changed

+63
-14
lines changed

devops/scripts/benchmarks/benches/compute.py

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ def benchmarks(self) -> list[Benchmark]:
8181
GraphApiSinKernelGraph(self, RUNTIMES.LEVEL_ZERO, 1, 5),
8282
GraphApiSinKernelGraph(self, RUNTIMES.LEVEL_ZERO, 0, 100),
8383
GraphApiSinKernelGraph(self, RUNTIMES.LEVEL_ZERO, 1, 100),
84+
UllsEmptyKernel(self, RUNTIMES.SYCL, 1000, 256),
85+
UllsEmptyKernel(self, RUNTIMES.LEVEL_ZERO, 1000, 256),
86+
UllsKernelSwitch(self, RUNTIMES.SYCL, 8, 200, 0, 0, 1, 1),
87+
UllsKernelSwitch(self, RUNTIMES.LEVEL_ZERO, 8, 200, 0, 0, 1, 1),
8488
]
8589

8690
if options.ur is not None:
@@ -531,3 +535,61 @@ def bin_args(self) -> list[str]:
531535
"--withCopyOffload=1",
532536
"--immediateAppendCmdList=0",
533537
]
538+
539+
class UllsEmptyKernel(ComputeBenchmark):
540+
def __init__(self, bench, runtime: RUNTIMES, wgc, wgs):
541+
self.wgc = wgc
542+
self.wgs = wgs
543+
self.runtime = runtime
544+
super().__init__(
545+
bench, f"ulls_benchmark_{runtime.value}", "EmptyKernel"
546+
)
547+
548+
def explicit_group(self):
549+
return f"EmptyKernel {self.wgc} {self.wgs}"
550+
551+
def description(self) -> str:
552+
return ""
553+
554+
def name(self):
555+
return f"ulls_benchmark_{self.runtime.value} EmptyKernel wgc:{self.wgc}, wgs:{self.wgs}"
556+
557+
def bin_args(self) -> list[str]:
558+
return [
559+
"--iterations=10000",
560+
f"--wgs={self.wgs}",
561+
f"--wgc={self.wgs}",
562+
]
563+
564+
class UllsKernelSwitch(ComputeBenchmark):
565+
def __init__(self, bench, runtime: RUNTIMES, count, kernelTime, barrier, hostVisible, ioq, ctrBasedEvents):
566+
self.count = count
567+
self.kernelTime = kernelTime
568+
self.barrier = barrier
569+
self.hostVisible = hostVisible
570+
self.ctrBasedEvents = ctrBasedEvents
571+
self.runtime = runtime
572+
self.ioq = ioq
573+
super().__init__(
574+
bench, f"ulls_benchmark_{runtime.value}", "KernelSwitch"
575+
)
576+
577+
def explicit_group(self):
578+
return f"KernelSwitch {self.count} {self.kernelTime}"
579+
580+
def description(self) -> str:
581+
return ""
582+
583+
def name(self):
584+
return f"ulls_benchmark_{self.runtime.value} KernelSwitch count {self.count} kernelTime {self.kernelTime}"
585+
586+
def bin_args(self) -> list[str]:
587+
return [
588+
"--iterations=1000",
589+
f"--count={self.count}",
590+
f"--kernelTime={self.kernelTime}",
591+
f"--barrier={self.barrier}",
592+
f"--hostVisible={self.hostVisible}",
593+
f"--ioq={self.ioq}",
594+
f"--ctrBasedEvents={self.ctrBasedEvents}",
595+
]

0 commit comments

Comments
 (0)