Accelerator — PyTorch Lightning 2.5.1.post0 documentation (original) (raw)
class lightning.pytorch.accelerators.Accelerator[source]¶
Bases: Accelerator, ABC
The Accelerator base class for Lightning PyTorch.
Warning
Writing your own accelerator is an experimental feature.
get_device_stats(device)[source]¶
Get stats for a given device.
Parameters:
device¶ (Union[device, str, int]) – device for which to get stats
Return type:
Returns:
Dictionary of device stats
Called by the Trainer to set up the accelerator before the model starts running on the device.
Parameters:
trainer¶ (Trainer) – the trainer instance
Return type: