test_sparse_addmm fails on linux-bionic-py3.11-clang9 / test (crossref, 1, 2, linux.2xlarge)
Labels: module: sparse, module: autograd, triaged, module: decompositions


## Issue description

As in the title.

## Code example

A copy of the failure from https://github.com/pytorch/pytorch/actions/runs/4479543973/jobs/7874005200:

```
test_sparse.py::TestSparseCPU::test_sparse_addmm_masked_cpu_complex128 RERUN [ 58%]
  test_sparse.py::TestSparseCPU::test_sparse_addmm_masked_cpu_complex128 RERUN [ 58%]
  test_sparse.py::TestSparseCPU::test_sparse_addmm_masked_cpu_complex128 FAILED [ 58%]
  
  ==================================== RERUNS ====================================
  ____________ TestSparseCPU.test_sparse_addmm_masked_cpu_complex128 _____________
  Traceback (most recent call last):
    File "test_sparse.py", line 1613, in test_sparse_addmm
      test_shape(7, 8, 9, 20, False, None)
    File "test_sparse.py", line 1611, in test_shape
      gradcheck(fn, (S, D1, D2))
    File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/testing/_internal/common_utils.py", line 3859, in gradcheck
      return torch.autograd.gradcheck(fn, inputs, **kwargs)
    File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/autograd/gradcheck.py", line 1553, in gradcheck
      return _gradcheck_helper(**args)
    File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/autograd/gradcheck.py", line 1567, in _gradcheck_helper
      _gradcheck_real_imag(gradcheck_fn, func, func_out, tupled_inputs, outputs, eps,
    File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/autograd/gradcheck.py", line 1155, in _gradcheck_real_imag
      gradcheck_fn(imag_fn, imag_func_out, tupled_inputs, imag_outputs, eps,
    File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/autograd/gradcheck.py", line 1402, in _fast_gradcheck
      all_v, all_u, all_u_dense = _make_vectors(inp_tensors, outputs, use_forward_ad=use_forward_ad)
    File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/autograd/gradcheck.py", line 1360, in _make_vectors
      ur = _vec_from_tensor(inp, g_cpu, True)
    File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/autograd/gradcheck.py", line 1257, in _vec_from_tensor
      values = torch.rand(x_values.numel(), generator=generator) \
    File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/testing/_internal/common_utils.py", line 982, in __torch_function__
      r = func(*args, **kwargs)
    File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_subclasses/fake_utils.py", line 87, in __torch_dispatch__
      fake_r = func(*fake_args, **fake_kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_ops.py", line 330, in __call__
    return self._op(*args, **kwargs or {})
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/utils/_stats.py", line 20, in wrapper
    return fn(*args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_subclasses/fake_tensor.py", line 1057, in __torch_dispatch__
    return self.dispatch(func, types, args, kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_subclasses/fake_tensor.py", line 1232, in dispatch
    op_impl_out = op_impl(self, func, *args, **kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_subclasses/fake_tensor.py", line 362, in constructors
    r = func(*args, **new_kwargs)
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_ops.py", line 330, in __call__
    return self._op(*args, **kwargs or {})
  File "/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/_decomp/decompositions.py", line 1998, in uniform_
    assert generator is None
AssertionError
```

## Temporary resolution

https://github.com/pytorch/pytorch/pull/97187 disables the test via `@unittest.skipIf(TEST_WITH_CROSSREF, "generator unsupport triggers assertion error")` decorator.
Previously, the test was skipped with a reference to https://github.com/pytorch/pytorch/issues/73145 .

## System Info

- PyTorch version: master


cc @alexsamardzic @nikitaved @cpuhrsch @amjames @bhosmer @ezyang @albanD @zou3519 @gqchen @soulitzer @Lezcano @Varal7 @SherlockNoMad @ngimel