From afe1df385b5ef37c3f75a49ceda94fdc448bf490 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 16 Jun 2020 15:08:14 -0700 Subject: [PATCH] dist.destroy_process_group() bug fix --- train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/train.py b/train.py index 484190a..e9be7e4 100644 --- a/train.py +++ b/train.py @@ -356,7 +356,7 @@ def train(hyp): if not opt.evolve: plot_results() # save as results.png print('%g epochs completed in %.3f hours.\n' % (epoch - start_epoch + 1, (time.time() - t0) / 3600)) - dist.destroy_process_group() if torch.cuda.device_count() > 1 else None + dist.destroy_process_group() if device.type != 'cpu' and torch.cuda.device_count() > 1 else None torch.cuda.empty_cache() return results