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 
return torch.randn(shape, d=d, d=torch.float32).contiguous(memory_format=memory_format)
            return input_generator_fn
        def transformation_cpu_fn(tensor, **kwargs):
            return tensor.cpu(**kwargs)
        def transformation_cuda_fn(tensor, **kwargs):
            return tensor.cuda(**kwargs)
        formats_shapes = (
            (torch.channels_last, (4, 3, 8, 8)),
            (torch.channels_last_3d, (4, 3, 8, 8, 8)))
        for mf, shape in formats_shapes:
            self._test_memory_format_transformations(
                'cuda', get_generator(mf, shape), transformation_cpu_fn, mf, default_is_preserve=True)
            self._test_memory_format_transformations(
                'cpu', get_generator(mf, shape), transformation_cuda_fn, mf, default_is_preserve=True)
    
    def test_pickle_gradscaler(self, d):
        
        
        
        
        
        
        
        
        d = torch.d(d)
        try_lazy_inits = (True, False) if d. == "cuda" else (False,)
        for lazy_init_scale in try_lazy_inits:
            a = torch.cuda.amp.GradScaler(init_scale=3., growth_factor=4., backoff_factor=.5, growth_interval=2)
            self.assertTrue(not a.is_enabled() if torch.cuda.amp.common.amp_definitely_not_available() else a.is_enabled())
            if lazy_init_scale: