Skip to content

Commit

Permalink
Skip the bisection when the start and end hash are the same (#2044)
Browse files Browse the repository at this point in the history
Summary:
Nightly releases could be built from the same commit on the main branch (e.g. [20231112](pytorch/pytorch@63a5a14) and [20231113](pytorch/pytorch@a45a8bf)).

If it happens, we can just skip the bisection because there is no code change.

Pull Request resolved: #2044

Test Plan: https://github.com/pytorch/benchmark/actions/runs/6906833305

Reviewed By: aaronenyeshi

Differential Revision: D51429932

Pulled By: xuzhao9

fbshipit-source-id: 1ee006f12006689f53483bbf8beb764557e024ca
  • Loading branch information
xuzhao9 authored and facebook-github-bot committed Nov 17, 2023
1 parent ff42ab8 commit 4278545
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bisection.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,10 @@ def output(self):
bisect_config=bisect_config,
output_json=args.output,
debug=args.debug)
if start_hash == end_hash:
print(f"Start and end hash are the same: {start_hash}. Skip bisection")
bisection.output()
exit(0)
assert bisection.prep(), "The working condition of bisection is not satisfied."
print("Preparation steps ok. Commit to bisect: " + " ".join([str(x) for x in bisection.target_repo.commits]))
bisection.run()
Expand Down

0 comments on commit 4278545

Please sign in to comment.