pytorch
53839ac9 - Fix internal assert for torch.heaviside with cuda tensor and cpu scalar tensor (#46831)

Commit
4 years ago
Fix internal assert for torch.heaviside with cuda tensor and cpu scalar tensor (#46831) Summary: Fixed https://github.com/pytorch/pytorch/issues/46681 ``` >>> x = torch.randn(10, device='cuda') >>> y = torch.tensor(1.) >>> torch.heaviside(x, y) tensor([0., 1., 0., 1., 1., 0., 1., 1., 1., 0.], device='cuda:0') ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/46831 Reviewed By: navahgar Differential Revision: D24567953 Pulled By: izdeby fbshipit-source-id: e5fcf4355b27ce0bdf434963d01863d3b24d0bea
Author
Parents
Loading