Platforms: linux

This test was disabled because it is failing on master ([recent examples](http://torch-ci.com/failure/test_torch.py%3A%3ATestTorch%3A%3Atest_equal)).

The cause seems to point to https://github.com/pytorch/pytorch/pull/100024 (or D45282119 as it was landed internally)

cc @mruberry @houseroad @ezyang 
@staticmethod
            def __new__(cls, x, *args, **kwargs):
                return super().__new__(cls, x, *args, **kwargs)
        x = torch.ones(5)
        test_tensor = TestTensor(x)
    def test_pyobj_preserved(self):
        x = torch.empty(2)
        x.foo = 2  # put so
        y = torch.empty(2)
        y.grad = x
        del x  # x is d
        self.assertEqual(y.grad.foo, 2)
        z = y.grad  # it's l
        del z  # it's d
        self.assertEqual(y.grad.foo, 2)
    def test_subclass_preserved(self):
        class MyTensor(torch.Tensor):
            pass
        x = MyTensor(torch.empty(2))
        y = torch.empty(2)
        y.grad = x
        del x  # x is d
        self.assertEqual((y.grad), MyTensor)
        z = y.grad  # it's l
        del z  # it's d
        self.assertEqual((y.grad), MyTensor)
    def test_tensor_slot_dealloc(self):
        class SlotTensor1(torch._C._TensorBase):