Revert "Remove python key when setting functional tensor metadata (#81401)"

This reverts commit b0199c06f604dcfaf59bd59ecee9f638ef0e5c3f.

Reverted https://github.com/pytorch/pytorch/pull/81401 on behalf of https://github.com/clee2000 due to broke trunk win force_on_cpu tests https://github.com/pytorch/pytorch/runs/7329017706?check_suite_focus=true
This commit is contained in:
PyTorch MergeBot
2022-07-13 21:55:47 +00:00
parent 623e041122
commit f2bb25a758
2 changed files with 1 additions and 5 deletions

View File

@ -110,10 +110,6 @@ class TestFunctionalization(TestCase):
out_functional_unwrapped = torch._from_functional_tensor(out_functional_)
self.assertEqual(out_ref_, out_functional_unwrapped)
def test_save_for_backwards_segfault(self):
inp = torch._to_functional_tensor(LoggingTensor(torch.randn(2, 2))).requires_grad_(True)
inp.exp()
def test_multiple_views_of_same_base(self):
def f(x):
y = x.view(-1)