Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 760ea47

Browse files
committed
update
1 parent b784239 commit 760ea47

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

torchchat/generate.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,7 @@ def callback(x, *, done_generating=False):
12071207
print(prof.key_averages().table(sort_by="self_cuda_time_total"))
12081208
else:
12091209
print(prof.key_averages().table(sort_by="self_xpu_time_total"))
1210+
torch.save(prof.key_averages().table(sort_by="self_xpu_time_total"), f"./{self.profile}.pt")
12101211
prof.export_chrome_trace(f"{self.profile}.json")
12111212

12121213
if start_pos >= max_seq_length:

0 commit comments

Comments
 (0)