Fix an invalid peephole transformation if input/output values are written to (#28455)

Summary:
fixes https://github.com/pytorch/pytorch/issues/28360
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28455

Differential Revision: D19374601

Pulled By: Krovatkin

fbshipit-source-id: 622f24b40aba03e79e55a6b8d25d88417f7d8bad
This commit is contained in:
Nikolay Korovaiko
2020-01-14 16:20:58 -08:00
committed by Facebook Github Bot
parent 2bd179147a
commit 02c3493a84
4 changed files with 456 additions and 332 deletions

View File

@ -553,7 +553,7 @@ class TestFuser(JitTestCase):
"aten::_size_if_not_equal"))
@unittest.skipIf(IS_SANDCASTLE, "NYI: fuser CPU support for Sandcastle")
@unittest.skipIf(GRAPH_EXECUTOR != ProfilingMode.LEGACY, "broken with profiling on")
@unittest.skip("deduplicating introduces aliasing in backward graph's outputs")
@enable_cpu_fuser
def test_fuser_deduplication(self):
# See that fusion kernel outputs are deduplicated when removing _grad_sum_to_size in the fuser's compilation