Accelerator
class lightning_fabric.accelerators. Accelerator [source]
Bases: abc.ABC
The Accelerator base class.
An Accelerator is meant to deal with one type of hardware.
abstract static auto_device_count ( ) [source]
Get the device count when set to auto.
Return type
int
abstract static get_parallel_devices ( devices ) [source]
Gets parallel devices for the Accelerator.
Return type
Any
abstract static is_available ( ) [source]
Detect if the hardware is available.
Return type
bool
abstract static parse_devices ( devices ) [source]
Accelerator device parsing logic.
Return type
Any
abstract setup_device ( device ) [source]
Create and prepare the device for the current process.
Return type
None
abstract teardown ( ) [source]
Clean up any state created by the accelerator.
Return type
None
To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. Read PyTorch Lightning's Privacy Policy .