@@ -39,11 +39,12 @@ def benchmarks(self) -> list[Benchmark]:
3939 ]
4040
4141class VelocityBase (Benchmark ):
42- def __init__ (self , name : str , bin_name : str , vb : VelocityBench ):
42+ def __init__ (self , name : str , bin_name : str , vb : VelocityBench , unit : str ):
4343 super ().__init__ (vb .directory )
4444 self .vb = vb
4545 self .bench_name = name
4646 self .bin_name = bin_name
47+ self .unit = unit
4748 self .code_path = os .path .join (self .vb .repo_path , self .bench_name , 'SYCL' )
4849
4950 def download_deps (self ):
@@ -83,21 +84,18 @@ def run(self, env_vars) -> list[Result]:
8384
8485 result = self .run_bench (command , env_vars )
8586
86- return [ Result (label = self .name (), value = self .parse_output (result ), command = command , env = env_vars , stdout = result ) ]
87+ return [ Result (label = self .name (), value = self .parse_output (result ), command = command , env = env_vars , stdout = result , unit = self . unit ) ]
8788
8889 def teardown (self ):
8990 return
9091
9192class Hashtable (VelocityBase ):
9293 def __init__ (self , vb : VelocityBench ):
93- super ().__init__ ("hashtable" , "hashtable_sycl" , vb )
94+ super ().__init__ ("hashtable" , "hashtable_sycl" , vb , "M keys/sec" )
9495
9596 def name (self ):
9697 return "Velocity-Bench Hashtable"
9798
98- def unit (self ):
99- return "M keys/sec"
100-
10199 def bin_args (self ) -> list [str ]:
102100 return ["--no-verify" ]
103101
@@ -114,15 +112,12 @@ def parse_output(self, stdout: str) -> float:
114112
115113class Bitcracker (VelocityBase ):
116114 def __init__ (self , vb : VelocityBench ):
117- super ().__init__ ("bitcracker" , "bitcracker" , vb )
115+ super ().__init__ ("bitcracker" , "bitcracker" , vb , "s" )
118116 self .data_path = os .path .join (vb .repo_path , "bitcracker" , "hash_pass" )
119117
120118 def name (self ):
121119 return "Velocity-Bench Bitcracker"
122120
123- def unit (self ):
124- return "s"
125-
126121 def bin_args (self ) -> list [str ]:
127122 return ["-f" , f"{ self .data_path } /img_win8_user_hash.txt" ,
128123 "-d" , f"{ self .data_path } /user_passwords_60000.txt" ,
@@ -137,7 +132,7 @@ def parse_output(self, stdout: str) -> float:
137132
138133class SobelFilter (VelocityBase ):
139134 def __init__ (self , vb : VelocityBench ):
140- super ().__init__ ("sobel_filter" , "sobel_filter" , vb )
135+ super ().__init__ ("sobel_filter" , "sobel_filter" , vb , "ms" )
141136
142137 def download_deps (self ):
143138 self .download ("sobel_filter" , "https://github.com/oneapi-src/Velocity-Bench/raw/main/sobel_filter/res/sobel_filter_data.tgz?download=" , "sobel_filter_data.tgz" , untar = True )
@@ -146,9 +141,6 @@ def download_deps(self):
146141 def name (self ):
147142 return "Velocity-Bench Sobel Filter"
148143
149- def unit (self ):
150- return "ms"
151-
152144 def bin_args (self ) -> list [str ]:
153145 return ["-i" , f"{ self .data_path } /sobel_filter_data/silverfalls_32Kx32K.png" ,
154146 "-n" , "5" ]
@@ -166,7 +158,7 @@ def parse_output(self, stdout: str) -> float:
166158
167159class QuickSilver (VelocityBase ):
168160 def __init__ (self , vb : VelocityBench ):
169- super ().__init__ ("QuickSilver" , "qs" , vb )
161+ super ().__init__ ("QuickSilver" , "qs" , vb , "MMS/CTT" )
170162 self .data_path = os .path .join (vb .repo_path , "QuickSilver" , "Examples" , "AllScattering" )
171163
172164 def run (self , env_vars ) -> list [Result ]:
@@ -179,9 +171,6 @@ def run(self, env_vars) -> list[Result]:
179171 def name (self ):
180172 return "Velocity-Bench QuickSilver"
181173
182- def unit (self ):
183- return "MMS/CTT"
184-
185174 def lower_is_better (self ):
186175 return False
187176
@@ -200,17 +189,14 @@ def parse_output(self, stdout: str) -> float:
200189
201190class Easywave (VelocityBase ):
202191 def __init__ (self , vb : VelocityBench ):
203- super ().__init__ ("easywave" , "easyWave_sycl" , vb )
192+ super ().__init__ ("easywave" , "easyWave_sycl" , vb , "ms" )
204193
205194 def download_deps (self ):
206195 self .download ("easywave" , "https://git.gfz-potsdam.de/id2/geoperil/easyWave/-/raw/master/data/examples.tar.gz" , "examples.tar.gz" , untar = True )
207196
208197 def name (self ):
209198 return "Velocity-Bench Easywave"
210199
211- def unit (self ):
212- return "ms"
213-
214200 def bin_args (self ) -> list [str ]:
215201 return ["-grid" , f"{ self .data_path } /examples/e2Asean.grd" ,
216202 "-source" , f"{ self .data_path } /examples/BengkuluSept2007.flt" ,
@@ -245,7 +231,7 @@ def parse_output(self, stdout: str) -> float:
245231
246232class CudaSift (VelocityBase ):
247233 def __init__ (self , vb : VelocityBench ):
248- super ().__init__ ("cudaSift" , "cudaSift" , vb )
234+ super ().__init__ ("cudaSift" , "cudaSift" , vb , "ms" )
249235
250236 def download_deps (self ):
251237 images = os .path .join (self .vb .repo_path , self .bench_name , 'inputData' )
@@ -256,9 +242,6 @@ def download_deps(self):
256242 def name (self ):
257243 return "Velocity-Bench CudaSift"
258244
259- def unit (self ):
260- return "ms"
261-
262245 def parse_output (self , stdout : str ) -> float :
263246 match = re .search (r'Avg workload time = (\d+\.\d+) ms' , stdout )
264247 if match :
0 commit comments