Skip to content

Commit e690bc4

Browse files
authored
Merge pull request #2381 from igchor/add_bench_mt
[Benchmarks] Add MemcpyExecute scenario with high ops count
2 parents 3715856 + 5fbfd55 commit e690bc4

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

scripts/benchmarks/benches/compute.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,16 @@ def benchmarks(self) -> list[Benchmark]:
5959
ExecImmediateCopyQueue(self, 0, 1, 'Device', 'Device', 1024),
6060
ExecImmediateCopyQueue(self, 1, 1, 'Device', 'Host', 1024),
6161
VectorSum(self),
62-
MemcpyExecute(self, 400, 1, 102400, 10, 1, 1),
63-
MemcpyExecute(self, 100, 8, 102400, 10, 1, 1),
64-
MemcpyExecute(self, 400, 8, 1024, 1000, 1, 1),
65-
MemcpyExecute(self, 10, 16, 1024, 10000, 1, 1),
66-
MemcpyExecute(self, 400, 1, 102400, 10, 0, 1),
67-
MemcpyExecute(self, 100, 8, 102400, 10, 0, 1),
68-
MemcpyExecute(self, 400, 8, 1024, 1000, 0, 1),
69-
MemcpyExecute(self, 10, 16, 1024, 10000, 0, 1),
62+
MemcpyExecute(self, 400, 1, 102400, 10, 1, 1, 1),
63+
MemcpyExecute(self, 100, 8, 102400, 10, 1, 1, 1),
64+
MemcpyExecute(self, 400, 8, 1024, 1000, 1, 1, 1),
65+
MemcpyExecute(self, 10, 16, 1024, 10000, 1, 1, 1),
66+
MemcpyExecute(self, 400, 1, 102400, 10, 0, 1, 1),
67+
MemcpyExecute(self, 100, 8, 102400, 10, 0, 1, 1),
68+
MemcpyExecute(self, 400, 8, 1024, 1000, 0, 1, 1),
69+
MemcpyExecute(self, 10, 16, 1024, 10000, 0, 1, 1),
70+
MemcpyExecute(self, 4096, 1, 1024, 10, 0, 1, 0),
71+
MemcpyExecute(self, 4096, 4, 1024, 10, 0, 1, 0),
7072
]
7173

7274
if options.ur is not None:
@@ -282,22 +284,23 @@ def bin_args(self) -> list[str]:
282284
]
283285

284286
class MemcpyExecute(ComputeBenchmark):
285-
def __init__(self, bench, numOpsPerThread, numThreads, allocSize, iterations, srcUSM, dstUSM):
287+
def __init__(self, bench, numOpsPerThread, numThreads, allocSize, iterations, srcUSM, dstUSM, useEvent):
286288
self.numOpsPerThread = numOpsPerThread
287289
self.numThreads = numThreads
288290
self.allocSize = allocSize
289291
self.iterations = iterations
290292
self.srcUSM = srcUSM
291293
self.dstUSM = dstUSM
294+
self.useEvents = useEvent
292295
super().__init__(bench, "multithread_benchmark_ur", "MemcpyExecute")
293296

294297
def name(self):
295-
return f"multithread_benchmark_ur MemcpyExecute opsPerThread:{self.numOpsPerThread}, numThreads:{self.numThreads}, allocSize:{self.allocSize} srcUSM:{self.srcUSM} dstUSM:{self.dstUSM}"
298+
return f"multithread_benchmark_ur MemcpyExecute opsPerThread:{self.numOpsPerThread}, numThreads:{self.numThreads}, allocSize:{self.allocSize} srcUSM:{self.srcUSM} dstUSM:{self.dstUSM}" + (" without events" if not self.useEvents else "")
296299

297300
def bin_args(self) -> list[str]:
298301
return [
299302
"--Ioq=1",
300-
"--UseEvents=1",
303+
f"--UseEvents={self.useEvents}",
301304
"--MeasureCompletion=1",
302305
"--UseQueuePerThread=1",
303306
f"--AllocSize={self.allocSize}",

0 commit comments

Comments
 (0)