Accelerator — lightning 2.5.1.post0 documentation (original) (raw)
class lightning.fabric.accelerators.Accelerator[source]¶
Bases: ABC
The Accelerator base class.
An Accelerator is meant to deal with one type of hardware.
Warning
Writing your own accelerator is an experimental feature.
abstract static auto_device_count()[source]¶
Get the device count when set to auto.
Return type:
abstract static get_parallel_devices(devices)[source]¶
Gets parallel devices for the Accelerator.
Return type:
abstract static is_available()[source]¶
Detect if the hardware is available.
Return type:
abstract static parse_devices(devices)[source]¶
Accelerator device parsing logic.
Return type:
abstract setup_device(device)[source]¶
Create and prepare the device for the current process.
Return type:
Clean up any state created by the accelerator.
Return type: