Repository: pytorch/benchmark
Issue: Build without `distributed`
Root cause: External Dependency Breakage

Distributed is an optional dependency, but when trying to build `torchbenchmark` with PyTorch built with `USE_DISTRIBUTED=0` it fails with a
```python
Traceback (most recent call last):                                                                                                                                                                                   
...                                                                                                                                                                                                                  
    from .accelerator import Accelerator                                                                                                                                                                             
  File "/home/paperspace/miniconda3/envs/pytorch-dev/lib/python3.8/site-packages/accelerate/accelerator.py", line 35, in <module>                                                                                    
    from .checkpointing import load_accelerator_state, load_custom_state, save_accelerator_state, save_custom_state                                                                                                  
  File "/home/paperspace/miniconda3/envs/pytorch-dev/lib/python3.8/site-packages/accelerate/checkpointing.py", line 24, in <module>                                                                                  
    from .utils import (                                                                                                                                                                                             
  File "/home/paperspace/miniconda3/envs/pytorch-dev/lib/python3.8/site-packages/accelerate/utils/__init__.py", line 132, in <module>                                                                                
    from .fsdp_utils import load_fsdp_model, load_fsdp_optimizer, save_fsdp_model, save_fsdp_optimizer                                                                                                               
  File "/home/paperspace/miniconda3/envs/pytorch-dev/lib/python3.8/site-packages/accelerate/utils/fsdp_utils.py", line 24, in <module>                                                                               
    import torch.distributed.checkpoint as dist_cp                                                                                                                                                                   
  File "/home/paperspace/git/pytorch/torch/distributed/checkpoint/__init__.py", line 1, in <module>                                                                                                                  
    from .metadata import (                                                                                                                                                                                          
  File "/home/paperspace/git/pytorch/torch/distributed/checkpoint/metadata.py", line 3, in <module>                                                                                                                  
    from torch.distributed._shard.sharded_tensor.metadata import TensorProperties                                                                                                                                    
  File "/home/paperspace/git/pytorch/torch/distributed/_shard/__init__.py", line 1, in <module>
    from .api import (
  File "/home/paperspace/git/pytorch/torch/distributed/_shard/api.py", line 5, in <module>
    from torch.distributed import distributed_c10d
  File "/home/paperspace/git/pytorch/torch/distributed/distributed_c10d.py", line 16, in <module>
    from torch._C._distributed_c10d import (
ModuleNotFoundError: No module named 'torch._C._distributed_c10d'; 'torch._C' is not a package
```

cc @wconstab @janeyx99 

This happens in `DALLE2_pytorch`

It also happens in all the `hf_*` models

Actually, this was a bug in `accelerate`. It was fixed 2 days ago:
https://github.com/huggingface/accelerate/commit/a9aee447ee55d1d2a13b41a433674edf8c512754

I'll patch my local import of `accelerate` for now.