1414from git_project import GitProject
1515from options import options
1616from utils .result import BenchmarkMetadata , Result
17+ from utils .logger import log
1718
1819from .base import Benchmark , Suite , TracingType
1920from .compute_metadata import ComputeMetadataGenerator
@@ -74,9 +75,13 @@ def setup(self) -> None:
7475 self .git_hash (),
7576 Path (options .workdir ),
7677 "compute-benchmarks" ,
77- force_rebuild = True ,
78+ use_installdir = False ,
7879 )
7980
81+ if not self .project .needs_rebuild ():
82+ log .info (f"Rebuilding { self .project .name } skipped" )
83+ return
84+
8085 extra_args = [
8186 f"-DBUILD_SYCL=ON" ,
8287 f"-DSYCL_COMPILER_ROOT={ options .sycl } " ,
@@ -96,7 +101,7 @@ def setup(self) -> None:
96101 f"-Dunified-runtime_DIR={ options .ur } /lib/cmake/unified-runtime" ,
97102 ]
98103
99- self .project .configure (extra_args , install_prefix = False , add_sycl = True )
104+ self .project .configure (extra_args , add_sycl = True )
100105 self .project .build (add_sycl = True )
101106
102107 def additional_metadata (self ) -> dict [str , BenchmarkMetadata ]:
@@ -266,12 +271,13 @@ def benchmarks(self) -> list[Benchmark]:
266271
267272 # Add UR-specific benchmarks
268273 benches += [
269- MemcpyExecute (self , RUNTIMES .UR , 400 , 1 , 102400 , 10 , 1 , 1 , 1 , 1 , 0 ),
270- MemcpyExecute (self , RUNTIMES .UR , 400 , 1 , 102400 , 10 , 0 , 1 , 1 , 1 , 0 ),
271- MemcpyExecute (self , RUNTIMES .UR , 100 , 4 , 102400 , 10 , 1 , 1 , 0 , 1 , 0 ),
272- MemcpyExecute (self , RUNTIMES .UR , 100 , 4 , 102400 , 10 , 1 , 1 , 0 , 0 , 0 ),
273- MemcpyExecute (self , RUNTIMES .UR , 4096 , 4 , 1024 , 10 , 0 , 1 , 0 , 1 , 0 ),
274- MemcpyExecute (self , RUNTIMES .UR , 4096 , 4 , 1024 , 10 , 0 , 1 , 0 , 1 , 1 ),
274+ # TODO: multithread_benchmark_ur fails with segfault
275+ # MemcpyExecute(self, RUNTIMES.UR, 400, 1, 102400, 10, 1, 1, 1, 1, 0),
276+ # MemcpyExecute(self, RUNTIMES.UR, 400, 1, 102400, 10, 0, 1, 1, 1, 0),
277+ # MemcpyExecute(self, RUNTIMES.UR, 100, 4, 102400, 10, 1, 1, 0, 1, 0),
278+ # MemcpyExecute(self, RUNTIMES.UR, 100, 4, 102400, 10, 1, 1, 0, 0, 0),
279+ # MemcpyExecute(self, RUNTIMES.UR, 4096, 4, 1024, 10, 0, 1, 0, 1, 0),
280+ # MemcpyExecute(self, RUNTIMES.UR, 4096, 4, 1024, 10, 0, 1, 0, 1, 1),
275281 UsmMemoryAllocation (self , RUNTIMES .UR , "Device" , 256 , "Both" ),
276282 UsmMemoryAllocation (self , RUNTIMES .UR , "Device" , 256 * 1024 , "Both" ),
277283 UsmBatchMemoryAllocation (self , RUNTIMES .UR , "Device" , 128 , 256 , "Both" ),
@@ -342,11 +348,12 @@ def cpu_count_str(self, separator: str = "") -> str:
342348
343349 def get_iters (self , run_trace : TracingType ):
344350 """Returns the number of iterations to run for the given tracing type."""
345- return (
346- self .iterations_trace
347- if run_trace != TracingType .NONE
348- else self .iterations_regular
349- )
351+ if options .exit_on_failure :
352+ # we are just testing that the benchmark runs successfully
353+ return 3
354+ if run_trace == TracingType .NONE :
355+ return self .iterations_regular
356+ return self .iterations_trace
350357
351358 def supported_runtimes (self ) -> list [RUNTIMES ]:
352359 """Base runtimes supported by this benchmark, can be overridden."""
@@ -764,6 +771,7 @@ def bin_args(self, run_trace: TracingType = TracingType.NONE) -> list[str]:
764771 "--contents=Zeros" ,
765772 "--multiplier=1" ,
766773 "--vectorSize=1" ,
774+ "--lws=256" ,
767775 ]
768776
769777
0 commit comments