Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions devops/scripts/benchmarks/benches/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,14 +304,14 @@ def benchmarks(self) -> list[Benchmark]:
class ComputeBenchmark(Benchmark):
def __init__(
self,
bench,
name,
test,
suite: ComputeBench,
name: str,
test: str,
runtime: RUNTIMES = None,
profiler_type: PROFILERS = PROFILERS.TIMER,
):
super().__init__(bench)
self.bench = bench
super().__init__(suite)
self.suite = suite
self.bench_name = name
self.test = test
self.runtime = runtime
Expand All @@ -327,7 +327,7 @@ def __init__(
@property
def benchmark_bin(self) -> Path:
"""Returns the path to the benchmark binary"""
return self.bench.project.build_dir / "bin" / self.bench_name
return self.suite.project.build_dir / "bin" / self.bench_name

def cpu_count_str(self, separator: str = "") -> str:
# Note: SYCL CI currently relies on this "CPU count" value.
Expand Down Expand Up @@ -432,8 +432,8 @@ def run(
command=command,
env=env_vars,
unit=unit,
git_url=self.bench.git_url(),
git_hash=self.bench.git_hash(),
git_url=self.suite.git_url(),
git_hash=self.suite.git_hash(),
)
)
return ret
Expand Down
16 changes: 8 additions & 8 deletions devops/scripts/benchmarks/benches/llamacpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ def benchmarks(self) -> list[Benchmark]:


class LlamaBench(Benchmark):
def __init__(self, bench):
super().__init__(bench)
self.bench = bench
def __init__(self, suite: LlamaCppBench):
super().__init__(suite)
self.suite = suite

@property
def benchmark_bin(self) -> Path:
return self.bench.project.build_dir / "bin" / "llama-bench"
return self.suite.project.build_dir / "bin" / "llama-bench"

def enabled(self):
if options.sycl is None:
Expand Down Expand Up @@ -134,13 +134,13 @@ def run(
"--mmap",
"0",
"--model",
f"{self.bench.model}",
f"{self.suite.model}",
]

result = self.run_bench(
command,
env_vars,
ld_library=self.bench.oneapi.ld_libraries(),
ld_library=self.suite.oneapi.ld_libraries(),
run_trace=run_trace,
force_trace=force_trace,
)
Expand All @@ -156,8 +156,8 @@ def run(
command=command,
env=env_vars,
unit="token/s",
git_url=self.bench.git_url(),
git_hash=self.bench.git_hash(),
git_url=self.suite.git_url(),
git_hash=self.suite.git_hash(),
)
)
return results
Expand Down
14 changes: 7 additions & 7 deletions devops/scripts/benchmarks/benches/syclbench.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ def benchmarks(self) -> list[Benchmark]:


class SyclBenchmark(Benchmark):
def __init__(self, bench, name, test):
super().__init__(bench)
self.bench = bench
def __init__(self, suite: SyclBench, name: str, test: str):
super().__init__(suite)
self.suite = suite
self.bench_name = name
self.test = test

@property
def benchmark_bin(self) -> Path:
return self.bench.project.build_dir / self.bench_name
return self.suite.project.build_dir / self.bench_name

def enabled(self) -> bool:
return options.sycl is not None
Expand Down Expand Up @@ -165,8 +165,8 @@ def run(
command=command,
env=env_vars,
unit="ms",
git_url=self.bench.git_url(),
git_hash=self.bench.git_hash(),
git_url=self.suite.git_url(),
git_hash=self.suite.git_hash(),
)
)

Expand All @@ -175,7 +175,7 @@ def run(
return res_list

def name(self):
return f"{self.bench.name()} {self.test}"
return f"{self.suite.name()} {self.test}"

def teardown(self):
return
Expand Down
5 changes: 2 additions & 3 deletions devops/scripts/benchmarks/benches/umf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ def benchmarks(self) -> list[Benchmark]:


class GBench(Benchmark):
def __init__(self, bench):
super().__init__(bench)
def __init__(self, suite: UMFSuite):
super().__init__(suite)

self.bench = bench
self.bench_name = "umf-benchmark"

self.fragmentation_prefix = "FRAGMENTATION_"
Expand Down
56 changes: 28 additions & 28 deletions devops/scripts/benchmarks/benches/velocity.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@ def benchmarks(self) -> list[Benchmark]:


class VelocityBase(Benchmark):
def __init__(self, name: str, bin_name: str, vb: VelocityBench, unit: str):
super().__init__(vb)
self.vb = vb
def __init__(self, suite: VelocityBench, name: str, bin_name: str, unit: str):
super().__init__(suite)
self.suite = suite
self.bench_name = name
self.bin_name = bin_name
self.unit = unit

@property
def src_dir(self) -> Path:
return self.vb.project.src_dir / self.bench_name / "SYCL"
return self.suite.project.src_dir / self.bench_name / "SYCL"

@property
def build_dir(self) -> Path:
return self.vb.project.build_dir / self.bench_name
return self.suite.project.build_dir / self.bench_name

@property
def benchmark_bin(self) -> Path:
Expand Down Expand Up @@ -173,8 +173,8 @@ def run(
command=command,
env=env_vars,
unit=self.unit,
git_url=self.vb.git_url(),
git_hash=self.vb.git_hash(),
git_url=self.suite.git_url(),
git_hash=self.suite.git_hash(),
)
]

Expand All @@ -183,8 +183,8 @@ def teardown(self):


class Hashtable(VelocityBase):
def __init__(self, vb: VelocityBench):
super().__init__("hashtable", "hashtable_sycl", vb, "M keys/sec")
def __init__(self, suite: VelocityBench):
super().__init__(suite, "hashtable", "hashtable_sycl", "M keys/sec")

def name(self):
return "Velocity-Bench Hashtable"
Expand Down Expand Up @@ -215,8 +215,8 @@ def get_tags(self):


class Bitcracker(VelocityBase):
def __init__(self, vb: VelocityBench):
super().__init__("bitcracker", "bitcracker", vb, "s")
def __init__(self, suite: VelocityBench):
super().__init__(suite, "bitcracker", "bitcracker", "s")

def name(self):
return "Velocity-Bench Bitcracker"
Expand All @@ -230,7 +230,7 @@ def description(self) -> str:

def bin_args(self) -> list[str]:
self.data_path = os.path.join(
self.vb.project.src_dir, "bitcracker", "hash_pass"
self.suite.project.src_dir, "bitcracker", "hash_pass"
)

return [
Expand Down Expand Up @@ -258,8 +258,8 @@ def get_tags(self):


class SobelFilter(VelocityBase):
def __init__(self, vb: VelocityBench):
super().__init__("sobel_filter", "sobel_filter", vb, "ms")
def __init__(self, suite: VelocityBench):
super().__init__(suite, "sobel_filter", "sobel_filter", "ms")

def download_deps(self):
self.download(
Expand Down Expand Up @@ -307,8 +307,8 @@ def get_tags(self):


class QuickSilver(VelocityBase):
def __init__(self, vb: VelocityBench):
super().__init__("QuickSilver", "qs", vb, "MMS/CTT")
def __init__(self, suite: VelocityBench):
super().__init__(suite, "QuickSilver", "qs", "MMS/CTT")

def run(
self,
Expand Down Expand Up @@ -340,7 +340,7 @@ def lower_is_better(self):

def bin_args(self) -> list[str]:
self.data_path = os.path.join(
self.vb.project.src_dir, "QuickSilver", "Examples", "AllScattering"
self.suite.project.src_dir, "QuickSilver", "Examples", "AllScattering"
)

return ["-i", f"{self.data_path}/scatteringOnly.inp"]
Expand All @@ -362,8 +362,8 @@ def get_tags(self):


class Easywave(VelocityBase):
def __init__(self, vb: VelocityBench):
super().__init__("easywave", "easyWave_sycl", vb, "ms")
def __init__(self, suite: VelocityBench):
super().__init__(suite, "easywave", "easyWave_sycl", "ms")

def download_deps(self):
self.download(
Expand Down Expand Up @@ -429,11 +429,11 @@ def get_tags(self):


class CudaSift(VelocityBase):
def __init__(self, vb: VelocityBench):
super().__init__("cudaSift", "cudaSift", vb, "ms")
def __init__(self, suite: VelocityBench):
super().__init__(suite, "cudaSift", "cudaSift", "ms")

def download_deps(self):
images = os.path.join(self.vb.project.src_dir, self.bench_name, "inputData")
images = os.path.join(self.suite.project.src_dir, self.bench_name, "inputData")
dest = os.path.join(options.workdir, "inputData")
if not os.path.exists(dest):
shutil.copytree(images, dest)
Expand All @@ -460,8 +460,8 @@ def get_tags(self):


class DLCifar(VelocityBase):
def __init__(self, vb: VelocityBench):
super().__init__("dl-cifar", "dl-cifar_sycl", vb, "s")
def __init__(self, suite: VelocityBench):
super().__init__(suite, "dl-cifar", "dl-cifar_sycl", "s")

def ld_libraries(self):
return get_oneapi().ld_libraries()
Expand Down Expand Up @@ -514,8 +514,8 @@ def get_tags(self):


class DLMnist(VelocityBase):
def __init__(self, vb: VelocityBench):
super().__init__("dl-mnist", "dl-mnist-sycl", vb, "s")
def __init__(self, suite: VelocityBench):
super().__init__(suite, "dl-mnist", "dl-mnist-sycl", "s")

def ld_libraries(self):
return get_oneapi().ld_libraries()
Expand Down Expand Up @@ -602,8 +602,8 @@ def get_tags(self):


class SVM(VelocityBase):
def __init__(self, vb: VelocityBench):
super().__init__("svm", "svm_sycl", vb, "s")
def __init__(self, suite: VelocityBench):
super().__init__(suite, "svm", "svm_sycl", "s")

def ld_libraries(self):
return get_oneapi().ld_libraries()
Expand Down