File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
scripts/benchmarks/benches Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 1515class Benchmark :
1616 def __init__ (self , directory ):
1717 self .directory = directory
18+
19+ @staticmethod
20+ def get_adapter_full_path ():
1821 for libs_dir_name in ['lib' , 'lib64' ]:
19- self . adapter_path = os .path .join (
22+ adapter_path = os .path .join (
2023 options .ur_dir , libs_dir_name , f"libur_adapter_{ options .ur_adapter_name } .so" )
21- if os .path .isfile (self .adapter_path ):
22- print (f"using adapter { self .adapter_path } " )
23- return
24- assert os .path .isfile (self .adapter_path ), \
25- f"could not find adapter file { self .adapter_path } (and in similar lib paths)"
24+ if os .path .isfile (adapter_path ):
25+ return adapter_path
26+ assert False , \
27+ f"could not find adapter file { adapter_path } (and in similar lib paths)"
2628
2729 def run_bench (self , command , env_vars ):
2830 env_vars_with_forced_adapter = env_vars .copy ()
29- env_vars_with_forced_adapter .update ({'UR_ADAPTERS_FORCE_LOAD' : self .adapter_path })
31+ env_vars_with_forced_adapter .update (
32+ {'UR_ADAPTERS_FORCE_LOAD' : Benchmark .get_adapter_full_path ()})
3033 return run (
3134 command = command ,
3235 env_vars = env_vars_with_forced_adapter ,
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ class ComputeBench:
1515 def __init__ (self , directory ):
1616 self .directory = directory
1717 self .built = False
18- return
1918
2019 def setup (self ):
2120 if self .built :
You can’t perform that action at this time.
0 commit comments