Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trying to make pow work for tensor raised to the power of a scalar (#…
…46185) Summary: Fixes #46037 I'm not sure this is the most performant solution, but this works: torch.pow(cuda_tensor, 5) should work and worked before. torch.pow(cuda_tensor, torch.tensor(5)), should work **and works now!** torch.pow(cuda_tensor, torch.tensor((5,))), should NOT work and complain the tensors are on different devices and indeed continues to complain. Pull Request resolved: #46185 Reviewed By: glaringlee, malfet Differential Revision: D24257687 Pulled By: janeyx99 fbshipit-source-id: 2daf235d62ec5886d7c153da05445c2ec71dec98
- Loading branch information