Error out on in-place binops on tensors with internal overlap (#19317)
authorRichard Zou <zou3519@gmail.com>
Wed, 17 Apr 2019 19:58:04 +0000 (12:58 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 17 Apr 2019 20:02:07 +0000 (13:02 -0700)
commiteaa14f5f59219117973202ebb79e96b960a92f9b
treeb6e76b2dfc65789c12c1aeda3e1aaf6d1bdee675
parentff4a4d615582e9d5d4941405323fea96da04d9d7
Error out on in-place binops on tensors with internal overlap (#19317)

Summary:
This adds checks for `mul_`, `add_`, `sub_`, `div_`, the most common
binops. See #17935 for more details.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19317

Differential Revision: D14972399

Pulled By: zou3519

fbshipit-source-id: b9de331dbdb2544ee859ded725a5b5659bfd11d2
aten/src/ATen/native/BinaryOps.cpp
test/test_cuda.py
test/test_torch.py