Skip to content

Commit 1f57812

Browse files
committed
[Benchmarks] add MT MemcpyExecute benchmark
1 parent 1b0fe32 commit 1f57812

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

scripts/benchmarks/benches/compute.py

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def setup(self):
2020
if self.built:
2121
return
2222

23-
repo_path = git_clone(self.directory, "compute-benchmarks-repo", "https://github.com/intel/compute-benchmarks.git", "08c41bb8bc1762ad53c6194df6d36bfcceff4aa2")
23+
repo_path = git_clone(self.directory, "compute-benchmarks-repo", "https://github.com/intel/compute-benchmarks.git", "aa6a3b2108bb86202b654ad28129156fa746d41d")
2424
build_path = create_build_path(self.directory, 'compute-benchmarks-build')
2525

2626
configure_command = [
@@ -231,3 +231,26 @@ def bin_args(self) -> list[str]:
231231
"--numberOfElementsY=256",
232232
"--numberOfElementsZ=256",
233233
]
234+
235+
class MemcpyExecute(ComputeBenchmark):
236+
def __init__(self, bench, numOpsPerThread, numThreads, allocSize, iterations):
237+
self.numOpsPerThread = numOpsPerThread
238+
self.numThreads = numThreads
239+
self.allocSize = allocSize
240+
self.iterations = iterations
241+
super().__init__(bench, "multithread_benchmark_ur", "MemcpyExecute")
242+
243+
def name(self):
244+
return f"multithread_benchmark_ur MemcpyExecute opsPerThread:{self.numOpsPerThread}, numThreads:{self.numThreads}, allocSize:{self.allocSize}"
245+
246+
def bin_args(self) -> list[str]:
247+
return [
248+
"--Ioq=1",
249+
"--UseEvents=1",
250+
"--MeasureCompletion=1",
251+
"--UseQueuePerThread=1",
252+
f"--AllocSize={self.allocSize}",
253+
f"--NumThreads={self.numThreads}",
254+
f"--NumOpsPerThread={self.numOpsPerThread}",
255+
f"--iterations={self.iterations}"
256+
]

scripts/benchmarks/main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ def main(directory, additional_env_vars, save_name, compare_names, filter):
4444
ExecImmediateCopyQueue(cb, 0, 1, 'Device', 'Device', 1024),
4545
ExecImmediateCopyQueue(cb, 1, 1, 'Device', 'Host', 1024),
4646
VectorSum(cb),
47+
MemcpyExecute(cb, 400, 8, 1024, 100),
48+
MemcpyExecute(cb, 400, 8, 102400, 10),
49+
MemcpyExecute(cb, 500, 8, 102400, 10),
50+
MemcpyExecute(cb, 400, 1, 1024, 1000),
51+
MemcpyExecute(cb, 10, 16, 1024, 1000),
52+
MemcpyExecute(cb, 10, 16, 102400, 100),
4753

4854
# *** Velocity benchmarks
4955
Hashtable(vb),

0 commit comments

Comments
 (0)