[feature] fix cli

This commit is contained in:
yichuan520030910320
2025-08-18 22:55:43 -07:00
parent a6f07a54f1
commit 37d990d51c
3 changed files with 3750 additions and 3803 deletions

View File

@@ -183,6 +183,9 @@ class Benchmark:
start_time = time.time()
with torch.no_grad():
self.model(input_ids=input_ids, attention_mask=attention_mask)
# mps sync
if torch.backends.mps.is_available():
torch.mps.synchronize()
end_time = time.time()
return end_time - start_time