compare-llama-bench: check remotes as well (#20406)

This commit is contained in:
Aman Gupta 2026-03-12 00:14:42 +08:00 committed by GitHub
parent b541241104
commit bd1ec818e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -293,6 +293,10 @@ class LlamaBenchData:
for t in self.repo.tags:
if t.name == name:
return t.commit.hexsha[:self.build_len]
for remote in self.repo.remotes:
for ref in remote.refs:
if ref.name == name or ref.remote_head == name:
return ref.commit.hexsha[:self.build_len]
for c in self.repo.iter_commits("--all"):
if c.hexsha[:self.build_len] == name[:self.build_len]:
return c.hexsha[:self.build_len]