Repository: pytorch
Issue: Some unit tests are failing
Labels: oncall: distributed,triaged,module: docker

### 🐛 Describe the bug

Some distributed tests and some core tests are failing.

Note: initially I got these error while running unit tests in v1.11.0, but then I've tried running them in the master branch, and got the same errors. The first 2 gists (see the links below) that are linked below contain the output of the unit tests in the master branch, while the last gist contains the output of the unit tests in docker using pytorch v1.11.0 since I could not build the docker image in the master branch (see below).

To reproduce the issue clone and build the master branch from source using the instructions in README.md, then install additional packages that are required by unit tests:
```bash
conda install pytest expecttest hypothesis
```
Then run the unit tests:
```
python test/run_test.py |& tee test_log_master.txt
```
[The output is large, so I've put it in a gist](https://gist.github.com/Daemonhost/df06dc16d4db5a61aacb4719d14ef058#file-test_log_master-txt). The errors are at the end.

After that I tried running core tests only
```
python test/run_test.py --core |& tee test_log_core_master.txt
```
[Here's the gist](https://gist.github.com/Daemonhost/df06dc16d4db5a61aacb4719d14ef058#file-test_log_core_master-txt).

## Unit tests in docker in v1.11.0
I could not build the docker image in the master branch. Here's the error message
```
#18 5.555 Building wheel torch-1.13.0a0+git83e575c                                                                                                                                                         
#18 5.556 Traceback (most recent call last):                                                                                                                                                               
#18 5.556   File "setup.py", line 317, in <module>                                                                                                                                                         
#18 5.556     cmake = CMake()
#18 5.556   File "/opt/pytorch/tools/setup_helpers/cmake.py", line 116, in __init__
#18 5.556     self._cmake_command = CMake._get_cmake_command()
#18 5.556   File "/opt/pytorch/tools/setup_helpers/cmake.py", line 145, in _get_cmake_command
#18 5.556     raise RuntimeError("no cmake or cmake3 with version >= 3.13.0 found")
#18 5.556 RuntimeError: no cmake or cmake3 with version >= 3.13.0 found
```
So instead I've built the docker image in v1.11.0, and tried running the core unit tests there. [Here's the gist](https://gist.github.com/Daemonhost/df06dc16d4db5a61aacb4719d14ef058#file-test_log_core_docker_v1-11-0-txt).

### Versions

```
Collecting environment information...
PyTorch version: 1.13.0a0+git83e575c
Is debug build: False
CUDA used to build PyTorch: 11.3
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.4 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: 10.0.0-4ubuntu1 
CMake version: version 3.22.1
Libc version: glibc-2.31

Python version: 3.8.13 (default, Mar 28 2022, 11:38:47)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.13.0-39-generic-x86_64-with-glibc2.17
Is CUDA available: True
CUDA runtime version: 11.3.58
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3060
Nvidia driver version: 510.54
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.18.4
[pip3] torch==1.13.0a0+git83e575c
[conda] blas                      1.0                         mkl  
[conda] magma-cuda113             2.5.2                         1    pytorch
[conda] mkl                       2021.4.0           h06a4308_640  
[conda] mkl-include               2022.0.1           h06a4308_117  
[conda] mkl-service               2.4.0            py38h7f8727e_0  
[conda] mkl_fft                   1.3.1            py38hd3c417c_0  
[conda] mkl_random                1.2.2            py38h51133e4_0  
[conda] numpy                     1.22.3           py38he7a7128_0  
[conda] numpy-base                1.22.3           py38hf524024_0  
[conda] torch                     1.13.0a0+git83e575c          pypi_0    pypi
```

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang @kwen2501