Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small tuning script output improvements #2262

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions benchmarks/scripts/cccl/bench/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def first_val(my_dict):
first_value = values[0]

if not all(value == first_value for value in values):
raise ValueError('All values in the dictionary are not equal')
raise ValueError('All values in the dictionary are not equal. First value: {} All values: {}'.format(first_value, values))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outputing values is verbose, but otherwise you have no clue what is actually wrong.


return first_value

Expand Down Expand Up @@ -648,11 +648,11 @@ def do_run(self, ct_point, rt_values, timeout, is_search=True):
p.wait(timeout=timeout)
elapsed = time.time() - begin

logger.info("finished benchmark {} with {} ({}) in {}s".format(self.label(), ct_point, p.returncode, elapsed))
logger.info("finished benchmark {} with {} ({}) in {:.3f}s".format(self.label(), ct_point, p.returncode, elapsed))

return BenchResult(result_path, p.returncode, elapsed)
except subprocess.TimeoutExpired:
logger.info("benchmark {} with {} reached timeout of {}s".format(self.label(), ct_point, timeout))
logger.info("benchmark {} with {} reached timeout of {:.3f}s".format(self.label(), ct_point, timeout))
os.killpg(os.getpgid(p.pid), signal.SIGTERM)
return BenchResult(None, 42, float('inf'))

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/scripts/cccl/bench/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def do_build(self, bench, timeout):
stderr=subprocess.DEVNULL)
p.wait(timeout=timeout)
elapsed = time.time() - begin
logger.info("finished build for {} ({}) in {}s".format(bench.label(), p.returncode, elapsed))
logger.info("finished build for {} (exit code: {}) in {:.3f}s".format(bench.label(), p.returncode, elapsed))

return Build(p.returncode, elapsed)
except subprocess.TimeoutExpired:
Expand Down
Loading