add torch.cuda.synchronize(device=None) (#19573)
Summary:
fixes https://github.com/pytorch/pytorch/issues/19509
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19573
Differential Revision: D15045730
Pulled By: ezyang
fbshipit-source-id: 732721b4b360fc4348ca7c87d4cd1386e7651bdd