@@ -39,11 +39,12 @@ def benchmarks(self) -> list[Benchmark]:
39
39
]
40
40
41
41
class 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 ):
43
43
super ().__init__ (vb .directory )
44
44
self .vb = vb
45
45
self .bench_name = name
46
46
self .bin_name = bin_name
47
+ self .unit = unit
47
48
self .code_path = os .path .join (self .vb .repo_path , self .bench_name , 'SYCL' )
48
49
49
50
def download_deps (self ):
@@ -83,21 +84,18 @@ def run(self, env_vars) -> list[Result]:
83
84
84
85
result = self .run_bench (command , env_vars )
85
86
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 ) ]
87
88
88
89
def teardown (self ):
89
90
return
90
91
91
92
class Hashtable (VelocityBase ):
92
93
def __init__ (self , vb : VelocityBench ):
93
- super ().__init__ ("hashtable" , "hashtable_sycl" , vb )
94
+ super ().__init__ ("hashtable" , "hashtable_sycl" , vb , "M keys/sec" )
94
95
95
96
def name (self ):
96
97
return "Velocity-Bench Hashtable"
97
98
98
- def unit (self ):
99
- return "M keys/sec"
100
-
101
99
def bin_args (self ) -> list [str ]:
102
100
return ["--no-verify" ]
103
101
@@ -114,15 +112,12 @@ def parse_output(self, stdout: str) -> float:
114
112
115
113
class Bitcracker (VelocityBase ):
116
114
def __init__ (self , vb : VelocityBench ):
117
- super ().__init__ ("bitcracker" , "bitcracker" , vb )
115
+ super ().__init__ ("bitcracker" , "bitcracker" , vb , "s" )
118
116
self .data_path = os .path .join (vb .repo_path , "bitcracker" , "hash_pass" )
119
117
120
118
def name (self ):
121
119
return "Velocity-Bench Bitcracker"
122
120
123
- def unit (self ):
124
- return "s"
125
-
126
121
def bin_args (self ) -> list [str ]:
127
122
return ["-f" , f"{ self .data_path } /img_win8_user_hash.txt" ,
128
123
"-d" , f"{ self .data_path } /user_passwords_60000.txt" ,
@@ -137,7 +132,7 @@ def parse_output(self, stdout: str) -> float:
137
132
138
133
class SobelFilter (VelocityBase ):
139
134
def __init__ (self , vb : VelocityBench ):
140
- super ().__init__ ("sobel_filter" , "sobel_filter" , vb )
135
+ super ().__init__ ("sobel_filter" , "sobel_filter" , vb , "ms" )
141
136
142
137
def download_deps (self ):
143
138
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):
146
141
def name (self ):
147
142
return "Velocity-Bench Sobel Filter"
148
143
149
- def unit (self ):
150
- return "ms"
151
-
152
144
def bin_args (self ) -> list [str ]:
153
145
return ["-i" , f"{ self .data_path } /sobel_filter_data/silverfalls_32Kx32K.png" ,
154
146
"-n" , "5" ]
@@ -166,7 +158,7 @@ def parse_output(self, stdout: str) -> float:
166
158
167
159
class QuickSilver (VelocityBase ):
168
160
def __init__ (self , vb : VelocityBench ):
169
- super ().__init__ ("QuickSilver" , "qs" , vb )
161
+ super ().__init__ ("QuickSilver" , "qs" , vb , "MMS/CTT" )
170
162
self .data_path = os .path .join (vb .repo_path , "QuickSilver" , "Examples" , "AllScattering" )
171
163
172
164
def run (self , env_vars ) -> list [Result ]:
@@ -179,9 +171,6 @@ def run(self, env_vars) -> list[Result]:
179
171
def name (self ):
180
172
return "Velocity-Bench QuickSilver"
181
173
182
- def unit (self ):
183
- return "MMS/CTT"
184
-
185
174
def lower_is_better (self ):
186
175
return False
187
176
@@ -200,17 +189,14 @@ def parse_output(self, stdout: str) -> float:
200
189
201
190
class Easywave (VelocityBase ):
202
191
def __init__ (self , vb : VelocityBench ):
203
- super ().__init__ ("easywave" , "easyWave_sycl" , vb )
192
+ super ().__init__ ("easywave" , "easyWave_sycl" , vb , "ms" )
204
193
205
194
def download_deps (self ):
206
195
self .download ("easywave" , "https://git.gfz-potsdam.de/id2/geoperil/easyWave/-/raw/master/data/examples.tar.gz" , "examples.tar.gz" , untar = True )
207
196
208
197
def name (self ):
209
198
return "Velocity-Bench Easywave"
210
199
211
- def unit (self ):
212
- return "ms"
213
-
214
200
def bin_args (self ) -> list [str ]:
215
201
return ["-grid" , f"{ self .data_path } /examples/e2Asean.grd" ,
216
202
"-source" , f"{ self .data_path } /examples/BengkuluSept2007.flt" ,
@@ -245,7 +231,7 @@ def parse_output(self, stdout: str) -> float:
245
231
246
232
class CudaSift (VelocityBase ):
247
233
def __init__ (self , vb : VelocityBench ):
248
- super ().__init__ ("cudaSift" , "cudaSift" , vb )
234
+ super ().__init__ ("cudaSift" , "cudaSift" , vb , "ms" )
249
235
250
236
def download_deps (self ):
251
237
images = os .path .join (self .vb .repo_path , self .bench_name , 'inputData' )
@@ -256,9 +242,6 @@ def download_deps(self):
256
242
def name (self ):
257
243
return "Velocity-Bench CudaSift"
258
244
259
- def unit (self ):
260
- return "ms"
261
-
262
245
def parse_output (self , stdout : str ) -> float :
263
246
match = re .search (r'Avg workload time = (\d+\.\d+) ms' , stdout )
264
247
if match :
0 commit comments