Skip to content

Commit

Permalink
[benchmarks] don't fail on suite setup issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pbalcer committed Feb 3, 2025
1 parent 476913f commit f93adc4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scripts/benchmarks/benches/oneapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ def install_package(self, name, url):

package = download(self.oneapi_dir, url, f'package_{name}.sh')
try:
print(f"installing f{name}")
print(f"installing {name}")
run(f"sh {package} -a -s --eula accept --install-dir {self.oneapi_dir} --instance f{self.ONEAPI_BENCHMARK_INSTANCE_ID}")
except:
print("oneAPI installation likely exists already")
return
print(f"f{name} installation complete")
print(f"{name} installation complete")

def package_dir(self, package, dir):
return os.path.join(self.oneapi_dir, package, 'latest', dir)
Expand Down
10 changes: 7 additions & 3 deletions scripts/benchmarks/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,13 @@ def main(directory, additional_env_vars, save_name, compare_names, filter):

if suite_benchmarks:
print(f"Setting up {type(s).__name__}")
s.setup()
print(f"{type(s).__name__} setup complete.")
benchmarks += suite_benchmarks
try:
s.setup()
except:
print(f"{type(s).__name__} setup failed. Benchmarks won't be added.")
else:
print(f"{type(s).__name__} setup complete.")
benchmarks += suite_benchmarks

for b in benchmarks:
print(b.name())
Expand Down

0 comments on commit f93adc4

Please sign in to comment.