99from .base import Benchmark , Suite
1010from .result import Result
1111from utils .utils import run , create_build_path
12- from . options import options
12+ from options import options
1313from .oneapi import get_oneapi
1414import shutil
1515
@@ -54,7 +54,6 @@ def __init__(self, name: str, bin_name: str, vb: VelocityBench, unit: str):
5454 self .bench_name = name
5555 self .bin_name = bin_name
5656 self .unit = unit
57- self .code_path = os .path .join (self .vb .repo_path , self .bench_name , 'SYCL' )
5857
5958 def download_deps (self ):
6059 return
@@ -66,6 +65,7 @@ def ld_libraries(self) -> list[str]:
6665 return []
6766
6867 def setup (self ):
68+ self .code_path = os .path .join (self .vb .repo_path , self .bench_name , 'SYCL' )
6969 self .download_deps ()
7070 self .benchmark_bin = os .path .join (self .directory , self .bench_name , self .bin_name )
7171
@@ -130,12 +130,13 @@ def parse_output(self, stdout: str) -> float:
130130class Bitcracker (VelocityBase ):
131131 def __init__ (self , vb : VelocityBench ):
132132 super ().__init__ ("bitcracker" , "bitcracker" , vb , "s" )
133- self .data_path = os .path .join (vb .repo_path , "bitcracker" , "hash_pass" )
134133
135134 def name (self ):
136135 return "Velocity-Bench Bitcracker"
137136
138137 def bin_args (self ) -> list [str ]:
138+ self .data_path = os .path .join (self .vb .repo_path , "bitcracker" , "hash_pass" )
139+
139140 return ["-f" , f"{ self .data_path } /img_win8_user_hash.txt" ,
140141 "-d" , f"{ self .data_path } /user_passwords_60000.txt" ,
141142 "-b" , "60000" ]
@@ -175,7 +176,6 @@ def parse_output(self, stdout: str) -> float:
175176class QuickSilver (VelocityBase ):
176177 def __init__ (self , vb : VelocityBench ):
177178 super ().__init__ ("QuickSilver" , "qs" , vb , "MMS/CTT" )
178- self .data_path = os .path .join (vb .repo_path , "QuickSilver" , "Examples" , "AllScattering" )
179179
180180 def run (self , env_vars ) -> list [Result ]:
181181 # TODO: fix the crash in QuickSilver when UR_L0_USE_IMMEDIATE_COMMANDLISTS=0
@@ -191,6 +191,8 @@ def lower_is_better(self):
191191 return False
192192
193193 def bin_args (self ) -> list [str ]:
194+ self .data_path = os .path .join (self .vb .repo_path , "QuickSilver" , "Examples" , "AllScattering" )
195+
194196 return ["-i" , f"{ self .data_path } /scatteringOnly.inp" ]
195197
196198 def extra_env_vars (self ) -> dict :
@@ -266,10 +268,11 @@ def parse_output(self, stdout: str) -> float:
266268
267269class DLCifar (VelocityBase ):
268270 def __init__ (self , vb : VelocityBench ):
269- self .oneapi = get_oneapi ()
270271 super ().__init__ ("dl-cifar" , "dl-cifar_sycl" , vb , "s" )
271272
272273 def ld_libraries (self ):
274+ self .oneapi = get_oneapi ()
275+
273276 return self .oneapi .ld_libraries ()
274277
275278 def download_deps (self ):
@@ -294,10 +297,11 @@ def parse_output(self, stdout: str) -> float:
294297
295298class DLMnist (VelocityBase ):
296299 def __init__ (self , vb : VelocityBench ):
297- self .oneapi = get_oneapi ()
298300 super ().__init__ ("dl-mnist" , "dl-mnist-sycl" , vb , "s" )
299301
300302 def ld_libraries (self ):
303+ self .oneapi = get_oneapi ()
304+
301305 return self .oneapi .ld_libraries ()
302306
303307 def download_deps (self ):
@@ -337,10 +341,11 @@ def parse_output(self, stdout: str) -> float:
337341
338342class SVM (VelocityBase ):
339343 def __init__ (self , vb : VelocityBench ):
340- self .oneapi = get_oneapi ()
341344 super ().__init__ ("svm" , "svm_sycl" , vb , "s" )
342345
343346 def ld_libraries (self ):
347+ self .oneapi = get_oneapi ()
348+
344349 return self .oneapi .ld_libraries ()
345350
346351 def extra_cmake_args (self ):
0 commit comments