Skip to content

Commit

Permalink
compare-llama-bench.py: fix long hexsha args (#6424)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesGaessler authored Apr 1, 2024
1 parent 226e819 commit 33a5244
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/compare-llama-bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ def get_commit_hexsha8(name):
for t in repo.tags:
if t.name == name:
return t.commit.hexsha[:8]
for c in repo.iter_commits("--all"):
if c.hexsha[:8] == name[:8]:
return c.hexsha[:8]
return None


Expand Down Expand Up @@ -224,7 +227,7 @@ def get_commit_hexsha8(name):
hexsha8_compare = get_commit_hexsha8(known_args.compare)
name_compare = known_args.compare
if hexsha8_compare is None:
print(f"ERROR: cannot find data for baseline={known_args.compare}.")
print(f"ERROR: cannot find data for compare={known_args.compare}.")
sys.exit(1)
# Otherwise, search for the commit for llama-bench was most recently run
# and that is not a parent of master:
Expand Down

0 comments on commit 33a5244

Please sign in to comment.