[dynamo] Handle inplace op aliasing errors #126474
Labels
module: correctness (silent)
issue that returns an incorrect result silently
module: dynamo
oncall: pt2
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Discovered with #126341.
Original repro command:
PYTORCH_TEST_WITH_DYNAMO=1 pytest test/test_torch.py::TestTorchDeviceTypeCPU::test_ternary_op_mem_overlap_cpu_float64
.test_binary_ufuncs.py::TestBinaryUfuncsCPU::test_binary_op_mem_overlap_cpu_float64
,test_unary_ufuncs.py::TestUnaryUfuncsCPU::test_unary_out_op_mem_overlap_cpu_float64
also fail for similar reasons.Repro:
Output:
Ideally, this error should be caught during tracing. Also, the
x = x + 1
line is skipped by dynamo.cc @ezyang @msaroufim @bdhirsh @anijain2305 @chauhang @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng
The text was updated successfully, but these errors were encountered: