Repository: pytorch
Issue: test_variant_consistency_eager_addbmm fails on both cpu and cuda
Labels: module: tests,triaged,module: linear algebra

```
======================================================================
Apr 13 00:27:23 FAIL [0.081s]: test_variant_consistency_eager_addbmm_cpu_complex64 (__main__.TestCommonCPU)
Apr 13 00:27:23 ----------------------------------------------------------------------
Apr 13 00:27:23 Traceback (most recent call last):
Apr 13 00:27:23   File "/Users/distiller/workspace/miniconda3/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 292, in instantiated_test
Apr 13 00:27:23     result = test_fn(self, *args)
Apr 13 00:27:23   File "/Users/distiller/workspace/miniconda3/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 266, in test_wrapper
Apr 13 00:27:23     return test(*args, **kwargs)
Apr 13 00:27:23   File "test_ops.py", line 332, in test_variant_consistency_eager
Apr 13 00:27:23     _test_inplace_preserve_storage(inplace_samples, inplace_variants)
Apr 13 00:27:23   File "test_ops.py", line 324, in _test_inplace_preserve_storage
Apr 13 00:27:23     self.assertEqual(data_ptr, variant_forward.data_ptr(), atol=0, rtol=0)
Apr 13 00:27:23   File "/Users/distiller/workspace/miniconda3/lib/python3.7/site-packages/torch/testing/_internal/common_utils.py", line 1371, in assertEqual
Apr 13 00:27:23     super().assertTrue(result, msg=self._get_assert_msg(msg, debug_msg=debug_msg))
Apr 13 00:27:23 AssertionError: False is not true : Scalars failed to compare as equal! Comparing 140229433848960 and 140229433789952 gives a difference of 59008, but the allowed difference with rtol=0 and atol=0 is only 0!
Apr 13 00:27:23 
Apr 13 00:27:23 ======================================================================
Apr 13 00:27:23 FAIL [0.036s]: test_variant_consistency_eager_addbmm_cpu_float32 (__main__.TestCommonCPU)
Apr 13 00:27:23 ----------------------------------------------------------------------
Apr 13 00:27:23 Traceback (most recent call last):
Apr 13 00:27:23   File "/Users/distiller/workspace/miniconda3/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 292, in instantiated_test
Apr 13 00:27:23     result = test_fn(self, *args)
Apr 13 00:27:23   File "/Users/distiller/workspace/miniconda3/lib/python3.7/site-packages/torch/testing/_internal/common_device_type.py", line 266, in test_wrapper
Apr 13 00:27:23     return test(*args, **kwargs)
Apr 13 00:27:23   File "test_ops.py", line 332, in test_variant_consistency_eager
Apr 13 00:27:23     _test_inplace_preserve_storage(inplace_samples, inplace_variants)
Apr 13 00:27:23   File "test_ops.py", line 324, in _test_inplace_preserve_storage
Apr 13 00:27:23     self.assertEqual(data_ptr, variant_forward.data_ptr(), atol=0, rtol=0)
Apr 13 00:27:23   File "/Users/distiller/workspace/miniconda3/lib/python3.7/site-packages/torch/testing/_internal/common_utils.py", line 1371, in assertEqual
Apr 13 00:27:23     super().assertTrue(result, msg=self._get_assert_msg(msg, debug_msg=debug_msg))
Apr 13 00:27:23 AssertionError: False is not true : Scalars failed to compare as equal! Comparing 140229433906432 and 140229433428224 gives a difference of 478208, but the allowed difference with rtol=0 and atol=0 is only 0!
 ======================================================================
Apr 13 00:55:56 FAIL [0.101s]: test_variant_consistency_eager_addbmm_cuda_complex64 (__main__.TestCommonCUDA)
Apr 13 00:55:56 ----------------------------------------------------------------------
Apr 13 00:55:56 Traceback (most recent call last):
Apr 13 00:55:56   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_utils.py", line 1030, in wrapper
Apr 13 00:55:56     method(*args, **kwargs)
Apr 13 00:55:56   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_utils.py", line 1030, in wrapper
Apr 13 00:55:56     method(*args, **kwargs)
Apr 13 00:55:56   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_device_type.py", line 292, in instantiated_test
Apr 13 00:55:56     result = test_fn(self, *args)
Apr 13 00:55:56   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_device_type.py", line 266, in test_wrapper
Apr 13 00:55:56     return test(*args, **kwargs)
Apr 13 00:55:56   File "test_ops.py", line 332, in test_variant_consistency_eager
Apr 13 00:55:56     _test_inplace_preserve_storage(inplace_samples, inplace_variants)
Apr 13 00:55:56   File "test_ops.py", line 324, in _test_inplace_preserve_storage
Apr 13 00:55:56     self.assertEqual(data_ptr, variant_forward.data_ptr(), atol=0, rtol=0)
Apr 13 00:55:56   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_utils.py", line 1371, in assertEqual
Apr 13 00:55:56     super().assertTrue(result, msg=self._get_assert_msg(msg, debug_msg=debug_msg))
Apr 13 00:55:56 AssertionError: False is not true : Scalars failed to compare as equal! Comparing 275147845632 and 275147848704 gives a difference of 3072, but the allowed difference with rtol=0 and atol=0 is only 0!
Apr 13 00:55:56 
Apr 13 00:55:56 ======================================================================
Apr 13 00:55:56 FAIL [0.065s]: test_variant_consistency_eager_addbmm_cuda_float32 (__main__.TestCommonCUDA)
Apr 13 00:55:56 ----------------------------------------------------------------------
Apr 13 00:55:56 Traceback (most recent call last):
Apr 13 00:55:56   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_utils.py", line 1030, in wrapper
Apr 13 00:55:56     method(*args, **kwargs)
Apr 13 00:55:56   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_utils.py", line 1030, in wrapper
Apr 13 00:55:56     method(*args, **kwargs)
Apr 13 00:55:56   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_device_type.py", line 292, in instantiated_test
Apr 13 00:55:56     result = test_fn(self, *args)
Apr 13 00:55:56   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_device_type.py", line 266, in test_wrapper
Apr 13 00:55:56     return test(*args, **kwargs)
Apr 13 00:55:56   File "test_ops.py", line 332, in test_variant_consistency_eager
Apr 13 00:55:56     _test_inplace_preserve_storage(inplace_samples, inplace_variants)
Apr 13 00:55:56   File "test_ops.py", line 324, in _test_inplace_preserve_storage
Apr 13 00:55:56     self.assertEqual(data_ptr, variant_forward.data_ptr(), atol=0, rtol=0)
Apr 13 00:55:56   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_utils.py", line 1371, in assertEqual
Apr 13 00:55:56     super().assertTrue(result, msg=self._get_assert_msg(msg, debug_msg=debug_msg))
Apr 13 00:55:56 AssertionError: False is not true : Scalars failed to compare as equal! Comparing 275149919744 and 275149930496 gives a difference of 10752, but the allowed difference with rtol=0 and atol=0 is only 0!
```

cc @mruberry @VitalyFedyunin @walterddr @jianyuh @nikitaved @pearu @heitorschueroff @IvanYashchuk @xwang233 @Lezcano