Skip to content

Commit

Permalink
feat: async transfer -> considerable perf increase
Browse files Browse the repository at this point in the history
  • Loading branch information
sehoffmann committed Mar 28, 2024
1 parent 02e96b9 commit 7b0ca01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dmlcloud/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def register_metric(self, name, reduction=None, dim=None, globally=True):

def track(self, name, value):
if isinstance(value, torch.Tensor):
value = value.detach().cpu()
value = value.detach().to('cpu', non_blocking=True)

if name not in self:
raise ValueError(f'Metric {name} does not exist')
Expand Down

0 comments on commit 7b0ca01

Please sign in to comment.