https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/ReduceOps.cpp#L372 1. Could probably do exp in-place? 2. Hopefully `torch.isinf` could be made to not allocate a full copy with abs call (currently [same](https://github.com/pytorch/pytorch/blob/bcb0bb7e0e03b386ad837015faba6b4b16e3bfb9/torch/functional.py#L284) happens in Python impl of `torch.isinf`) cc @VitalyFedyunin @ngimel @mruberry