# torch.accelerator

```{eval-rst}
.. automodule:: torch.accelerator
   :no-members:
```

```{eval-rst}
.. currentmodule:: torch.accelerator
```

```{eval-rst}
.. autosummary::
    :toctree: generated
    :nosignatures:

    device_count
    is_available
    current_accelerator
    set_device_index
    set_device_idx
    current_device_index
    current_device_idx
    get_device_capability
    set_stream
    current_stream
    synchronize
    device_index
```

## Graphs

```{eval-rst}
.. autosummary::
    :toctree: generated
    :nosignatures:

    Graph
```

```{eval-rst}
.. automodule:: torch.accelerator.memory
```
```{eval-rst}
.. currentmodule:: torch.accelerator.memory
```

## Memory management
```{eval-rst}
.. autosummary::
    :toctree: generated
    :nosignatures:

     empty_cache
     empty_host_cache
     get_memory_info
     max_memory_allocated
     max_memory_reserved
     memory_allocated
     memory_reserved
     memory_stats
     reset_accumulated_memory_stats
     reset_peak_memory_stats
```
